OleSaveToStream

3.1

  #include <ole.h>    

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

The OleSaveToStream function saves an object to the stream.

Parameters

lpObject

Points to the object to be saved to 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 may 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