Saves an object with the IPersistStream interface on it to the specified stream.
WINOLEAPI OleSaveToStream(
IPersistStream * pPStm, |
//Pointer to the interface on the object to be saved |
IStream * pStm |
//Pointer to the destination stream to which the object is saved |
); |
Parameters
Return Values
This function can also return any of the error values returned by the WriteClassStm function or the IPersistStream::Save method.
Remarks
This function simplifies saving an object that implements the IPersistStream interface to a stream. In this stream, the object’s CLSID precedes its data. When the stream is retrieved, the CLSID permits the proper code to be associated with the data. The OleSaveToStream function does the following:
The companion helper, OleLoadFromStream, loads objects saved in this way.
See Also
OleLoadFromStream, IPersistStream, IStream