Поделиться через


IManagedAddin::Load

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Called when a managed VSTO Add-in is loaded.

Syntax

HRESULT Load([in] BSTR bstrManifestURL,
             [in] IDispatch *pdispApplication);

Parameters

Parameter Description
bstrManifestURL The full path of the manifest for the VSTO Add-in.
pdispApplication A pointer to an IDispatch that represents the host application that is loading the VSTO Add-in.

Return Value

An HRESULT value that indicates whether the method completed successfully.

Remarks

A manifest is a file (typically, an XML file) that provides information that is used to help load the VSTO Add-in. For example, a manifest can specify the location of the VSTO Add-in assembly and the entry point class to instantiate when the VSTO Add-in is loaded.

The bstrManifestURL parameter contains the value of the Manifest entry under the HKEY_CURRENT_USER\Software\Microsoft\Office\<application name>\Addins\<add-in ID> registry key for the VSTO Add-in. For more information, see IManagedAddin interface.

Implement the IManagedAddIn::Load method to perform tasks such as configuring the application domain and security policy for the VSTO Add-in that is being loaded.

See also