Export (0) Print
Expand All

IPersistHistory::LoadHistory Method

Restores the state of the component.


HRESULT LoadHistory(
    IStream *pStream,
    IBindCtx *pbc


[in] A pointer to an interface on the stream from which the object loads its persistent state.
[in] A pointer to an interface on a bind context. The bind context is used in binding operations to restore the component's state and is passed 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.


The container calls IPersistHistory::LoadHistory to request that the component restore its state.

The component should never add a reference to the supplied stream. The stream should not be cached by the component.

Community Additions

© 2014 Microsoft