OleLoadFromStream function (ole2.h)
Loads an object from the stream.
HRESULT OleLoadFromStream( LPSTREAM pStm, REFIID iidInterface, LPVOID *ppvObj );
Pointer to the IStream interface on the stream from which the object is to be loaded.
Interface identifier (IID) the caller wants to use to communicate with the object after it is loaded.
Address of pointer variable that receives the interface pointer requested in riid. Upon successful return, *ppvObj contains the requested interface pointer on the newly loaded object.
This function returns S_OK on success. Other possible values include the following.
||Insufficient memory for the operation.|
||The object does not support the specified interface.|
Security Note: Calling this method with untrusted data is a security risk. Call this method only with trusted data. For more information, see Untrusted Data Security Risks.
If the CLSID for the stream is CLSID_NULL, the ppvObj parameter is set to NULL.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Header||ole2.h (include Ole2.h)|
|API set||ext-ms-win-com-ole32-l1-1-5 (introduced in Windows 10, version 10.0.15063)|