Restores the state of the component.
Syntax
HRESULT LoadHistory( IStream *pStream, IBindCtx *pbc );
Parameters
- pStream
- [in] Address of an interface on the stream from which the object should load its persistent state.
- pbc
- [in] Address of an interface on a bind context. The bind context can be used in binding operations to restore the component's state and should be passed along to any objects contained by the component if a binding is to be performed by the contained component.
Return Value
Returns one of the following values:
S_OK The component was able to reload its persistent state. E_FAIL The component was unable to reload its persistent state. E_OUTOFMEMORY There was not enough memory to reload the persistent state of the component. E_POINTER The stream or the bind context supplied by the container was invalid.
Remarks
The container calls LoadHistory to request that the component restore its state.
The component should under no circumstances add a reference to the supplied stream. The stream should not be cached by the component.