OleLoadFromStream

Loads an object from the stream.

HRESULT OleLoadFromStream(

IStream * pStm,
//Points to stream from which object is to be loaded
REFIID iidInterface,
//Interface to use for the object being loaded
void ** ppvObj
//Points to the newly loaded object
);

Parameters

pStm

Points to the stream from which the object is to be loaded.

iidInterface

Specifies the interface the caller wants to use to talk to the object once it is loaded.

ppvObj

Points to the newly loaded object.

Return Values

S_OK

Indicates the object was successfully loaded.

E_OUTOFMEMORY

Indicates the object could not be loaded due to a lack of memory.

E_NOINTERFACE

Indicates the specified interface is not supported.

See also the ReadClassStm function for other error return values.

See also the CoCreateInstance function for other error return values.

See also the IPersistStorage::Load method for other error return values.

Comments

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.

If the CLSID for the stream is CLSID_NULL, the ppvObj parameter is set to NULL.

See Also

OleSaveToStream

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database