Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Loads an object from the stream.
HRESULT OleLoadFromStream(
[in] LPSTREAM pStm,
[in] REFIID iidInterface,
[out] LPVOID *ppvObj
);
[in] pStm
Pointer to the IStream interface on the stream from which the object is to be loaded.
[in] iidInterface
Interface identifier (IID) the caller wants to use to communicate with the object after it is loaded.
[out] ppvObj
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.
Return code | Description |
---|---|
|
Insufficient memory for the operation. |
|
The object does not support the specified interface. |
This function can also return any of the error values returned by the ReadClassStm and CoCreateInstance functions, and the IPersistStream::Load method.
Security Note: Calling this method with untrusted data is a security risk. Call this method only with trusted data.
If the CLSID for the stream is CLSID_NULL, the ppvObj parameter is set to NULL.
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | ole2.h (include Ole2.h) |
Library | Ole32.lib |
DLL | Ole32.dll |
API set | ext-ms-win-com-ole32-l1-1-5 (introduced in Windows 10, version 10.0.15063) |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today