Compartilhar via


IVsLibrary.LoadState(IStream, LIB_PERSISTTYPE) Method

Definition

Asks the library to load its persisted global Browse Containers.

public:
 int LoadState(Microsoft::VisualStudio::OLE::Interop::IStream ^ pIStream, Microsoft::VisualStudio::Shell::Interop::LIB_PERSISTTYPE lptType);
public:
 int LoadState(Microsoft::VisualStudio::OLE::Interop::IStream ^ pIStream, Microsoft::VisualStudio::Shell::Interop::LIB_PERSISTTYPE lptType);
int LoadState(Microsoft::VisualStudio::OLE::Interop::IStream const & pIStream, Microsoft::VisualStudio::Shell::Interop::LIB_PERSISTTYPE lptType);
public int LoadState (Microsoft.VisualStudio.OLE.Interop.IStream pIStream, Microsoft.VisualStudio.Shell.Interop.LIB_PERSISTTYPE lptType);
abstract member LoadState : Microsoft.VisualStudio.OLE.Interop.IStream * Microsoft.VisualStudio.Shell.Interop.LIB_PERSISTTYPE -> int
Public Function LoadState (pIStream As IStream, lptType As LIB_PERSISTTYPE) As Integer

Parameters

pIStream
IStream

[in] Pointer to an IStream interface.

lptType
LIB_PERSISTTYPE

[in] Specifies the persisted type of the library. Always LPT_GLOBAL.

Returns

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.

Applies to