Initializes an object from the stream where it was previously saved.
HRESULT Load(
IStream *pStm //Pointer to the stream from which the object
//should be loaded
);
This method loads an object from its associated stream. The seek pointer is set as it was in the most recent IPersistStream::Save method. This method can seek and read from the stream, but cannot write to it.
On exit, the seek pointer should be left in the same position as it was on exit from Save, immediately past the end of the data.
Rather than calling IPersistStream::Load directly, you typically call the OleLoadFromStream function does the following:
The OleLoadFromStream function assumes that objects are stored in the stream with a class identifier followed by the object data. This storage pattern is used by the generic, composite-moniker implementation provided by OLE.
If the objects are not stored using this pattern, you must call the methods separately yourself.
Windows NT: Use version 3.1 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in objidl.h.
CoCreateInstance, OleLoadFromStream, ReadClassStm