Share via


LoadHistory method

Restores the state of the component.

Syntax

HRESULT retVal = object.LoadHistory(pStream, pbc);

Parameters

  • pStream [in]
    Type: IStream

    A pointer to an interface on the stream from which the object loads its persistent state.

  • pbc [in]
    Type: IBindCtx

    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.

Remarks

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.