Loads an object from the stream.
WINOLEAPI OleLoadFromStream(
IStream * pStm, //Pointer to stream from which object is to
// be loaded
REFIID iidInterface, //Interface identifier
void ** ppvObj //Address of output variable that receives
// the interface pointer requested in riid
);
This function supports the standard return value E_OUTOFMEMORY, as well as the following:
This function can also return any of the error values returned by the ReadClassStm and CoCreateInstance functions, and the IPersistStorage::Load method.
This function can be used to load an object that supports the IPersistStream interface. The CLSID of the object must immediately precede the object's data in the stream, which is accomplished by the companion function OleSaveToStream (or the operations it wraps, which are described under that topic).
If the CLSID for the stream is CLSID_NULL, the ppvObj parameter is set to NULL.
Windows NT: Use version 3.1 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in ole2.h.
Import Library: Included as a resource in ole32.dll.