OleSetData

3.1

  #include <ole.h>    

  OLESTATUS OleSetData(lpObject, cfFormat, hData)    
  LPOLEOBJECT lpObject; /* address of object */
  OLECLIPFORMAT cfFormat; /* format of data to send */
  HANDLE hData; /* memory containing data */

The OleSetData function sends data in the specified format to the server associated with a specified object.

Parameters

lpObject

Points to an object specifying the server to which data is to be sent.

cfFormat

Specifies the format of the data.

hData

Identifies a memory object containing the data in the specified format.

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_BUSY
OLE_ERROR_BLANK
OLE_ERROR_MEMORY
OLE_ERROR_NOT_OPEN
OLE_ERROR_OBJECT
OLE_WAIT_FOR_RELEASE

If the specified object cannot accept the data, the function returns an error value. If the server is not open and the requested data format is different from the format of the presentation data, the return value is OLE_ERROR_NOT_OPEN.

See Also

OleGetData, OleRequestData