OleRequestData

3.1

  #include <ole.h>    

  OLESTATUS OleRequestData(lpObject, cfFormat)    
  LPOLEOBJECT lpObject; /* address of object to query */
  OLECLIPFORMAT cfFormat; /* format for retrieved data */

The OleRequestData function requests the library to retrieve data in a specified format from a server.

Parameters

lpObject

Points to the object that is associated with the server from which data is to be retrieved.

cfFormat

Specifies the format in which data is to be returned. This parameter can be one of the predefined clipboard formats or the value returned by the RegisterClipboardFormat function.

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_NOT_OPEN
OLE_ERROR_OBJECT
OLE_ERROR_STATIC
OLE_WAIT_FOR_RELEASE

Comments

The client application should be connected to the server application when the client calls the OleRequestData function. When the client receives the OLE_RELEASE notification, it can retrieve the data from the object by using the OleGetData function or query the data by using such functions as OleQueryBounds.

If the requested data format is the same as the presentation data for the object, the library manages the data and updates the presentation.

The OleRequestData function returns OLE_WAIT_FOR_RELEASE if the server is busy. In this case, the application should continue to dispatch messages until it receives a callback notification with the OLE_RELEASE argument.

See Also

OleEnumFormats, OleGetData, OleSetData, RegisterClipboardFormat