IVsLibrary.LoadState Method
Asks the library to load its persisted global Browse Containers.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function LoadState ( _
pIStream As IStream, _
lptType As LIB_PERSISTTYPE _
) As Integer
'Usage
Dim instance As IVsLibrary
Dim pIStream As IStream
Dim lptType As LIB_PERSISTTYPE
Dim returnValue As Integer
returnValue = instance.LoadState(pIStream, _
lptType)
int LoadState(
IStream pIStream,
LIB_PERSISTTYPE lptType
)
int LoadState(
[InAttribute] IStream^ pIStream,
[InAttribute] LIB_PERSISTTYPE lptType
)
abstract LoadState :
pIStream:IStream *
lptType:LIB_PERSISTTYPE -> int
function LoadState(
pIStream : IStream,
lptType : LIB_PERSISTTYPE
) : int
Parameters
- pIStream
Type: Microsoft.VisualStudio.OLE.Interop.IStream
[in] Pointer to an IStream interface.
- lptType
Type: Microsoft.VisualStudio.Shell.Interop.LIB_PERSISTTYPE
[in] Specifies the persisted type of the library. Always LPT_GLOBAL.
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 IVsLibrary::LoadState(
[in] IStream *pIStream,
[in] LIB_PERSISTTYPE lptType
);
When a library manager registers itself with the environment's object manager, the environment iteratively calls this method for each library within the library manager to obtain its list of persisted libraries. Because this method is meaningful only for libraries providing global browse containers, the lptType parameter, an enumerator of LIB_PERSISTTYPE, will always be LPT_GLOBAL. Fill pIStream with whatever information you choose to provide about the library.
.NET Framework Security
- 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.