IVsObjectManager.RegisterLibMgr Method
Registers a library with the environment's object manager.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'宣言
Function RegisterLibMgr ( _
ByRef rguidLibMgr As Guid, _
pLibMgr As IVsLibraryMgr, _
<OutAttribute> ByRef pdwCookie As UInteger _
) As Integer
'使用
Dim instance As IVsObjectManager
Dim rguidLibMgr As Guid
Dim pLibMgr As IVsLibraryMgr
Dim pdwCookie As UInteger
Dim returnValue As Integer
returnValue = instance.RegisterLibMgr(rguidLibMgr, _
pLibMgr, pdwCookie)
int RegisterLibMgr(
ref Guid rguidLibMgr,
IVsLibraryMgr pLibMgr,
out uint pdwCookie
)
int RegisterLibMgr(
[InAttribute] Guid% rguidLibMgr,
[InAttribute] IVsLibraryMgr^ pLibMgr,
[OutAttribute] unsigned int% pdwCookie
)
function RegisterLibMgr(
rguidLibMgr : Guid,
pLibMgr : IVsLibraryMgr,
pdwCookie : uint
) : int
Parameters
rguidLibMgr
Type: System.Guid%[in] GUID of a library manager.
pLibMgr
Type: Microsoft.VisualStudio.Shell.Interop.IVsLibraryMgr[in] Pointer to a library manager.
pdwCookie
Type: System.UInt32%[out] Abstract handle identifying the newly registered library manager.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From vsshell.idl:
HRESULT IVsObjectManager::RegisterLibMgr(
[in] REFGUID rguidLibMgr,
[in] IVsLibraryMgr* pLibMgr,
[out] VSCOOKIE* pdwCookie
);
Register your package's library manager during SetSite.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.