Compartilhar via


IVsShell.LoadPackage Method

Triggers a VSPackage implementation DLL to be loaded into the environment.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaration
Function LoadPackage ( _
    ByRef guidPackage As Guid, _
    <OutAttribute> ByRef ppPackage As IVsPackage _
) As Integer
int LoadPackage(
    ref Guid guidPackage,
    out IVsPackage ppPackage
)
int LoadPackage(
    [InAttribute] Guid% guidPackage, 
    [OutAttribute] IVsPackage^% ppPackage
)
abstract LoadPackage : 
        guidPackage:Guid byref * 
        ppPackage:IVsPackage byref -> int
function LoadPackage(
    guidPackage : Guid, 
    ppPackage : IVsPackage
) : int

Parameters

  • guidPackage
    Type: Guid%

    [in] Unique identifier of the VSPackage.

Return Value

Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsShell::LoadPackage(
   [in] REFGUID guidPackage,
   [out, retval] IVsPackage **ppPackage
);

This method is called internally, instead of directly by the user. The VSPackage is not registered in the global portion of the registry; it is registered relative to the Microsoft Visual Studio hierarchy in the registry. For more information, see ILocalRegistry2.

.NET Framework Security

See Also

Reference

IVsShell Interface

Microsoft.VisualStudio.Shell.Interop Namespace