9.6.16 OleRequestData

OLESTATUS OleRequestData(lpObject, cfFormat)

LPOLEOBJECT lpObject;

OLECLIPFORMAT cfFormat;

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

Parameter Description

lpObject Points to the object that is associated with the server from which data is retrieved.
cfFormat Specifies the format in which data is returned. This parameter can be one of the predefined clipboard formats or the value returned by the RegisterClipboardFormat function.

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 and OleQuerySize.

If the requested data format is the same as the presentation data for the object, the DLL 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.

The return value is OLE_OK if successful; otherwise, it could be one of the following:

OLE_BUSY

OLE_ERROR_FORMAT

OLE_ERROR_GENERIC

OLE_ERROR_NOT_OPEN

OLE_ERROR_OBJECT

OLE_WAIT_FOR_RELEASE

See AlsoOleEnumFormats, OleGetData, OleSetData, RegisterClipboardFormat