OleSaveToStream

  OLESTATUS OleSaveToStream(lpObject, lpStream)    
  LPOLEOBJECT lpObject; /* pointer to object to save */
  LPOLESTREAM lpStream; /* pointer to OLESTREAM structure */

The OleSaveToStream function saves an object to the stream.

Parameters

lpObject

Points to the object to save into the stream.

lpStream

Points to an OLESTREAM structure allocated and initialized by the client application. The library calls the Put function in the OLESTREAM structure to store the data from the object.

Return Value

The return value is OLE_OK if the function is successful. Otherwise, it is an error value, which can be one of the following:

OLE_ERROR_BLANK
OLE_ERROR_MEMORY
OLE_ERROR_OBJECT
OLE_ERROR_STREAM

Comments

An application can use the OleQuerySize function to find the number of bytes to allocate for the object.

See Also

OleLoadFromStream, OleQuerySize