Platform SDK: Interprocess Communications

XTYP_REQUEST

A client uses the XTYP_REQUEST transaction to request data from a server. A DDE server callback function, DdeCallback, receives this transaction when a client specifies XTYP_REQUEST in the DdeClientTransaction function.

HDDEDATA CALLBACK DdeCallback(
  UINT uType,     // XTYP_REQUEST
  UINT uFmt,      // clipboard data format
  HCONV hconv,    // handle to the conversation
  HSZ hsz1,       // handle to a string
  HSZ hsz2,       // handle to a string
  HDDEDATA hdata, // handle to a global memory object
  DWORD dwData1,  // transaction-specific data
  DWORD dwData2   // transaction-specific data
);

Parameters

uType
Specifies the transaction type.
uFmt
Specifies the format in which the server should submit data to the client.
hconv
Handle to the conversation.
hsz1
Handle to the topic name.
hsz2
Handle to the item name.
hdata
Not used.
dwData1
Not used.
dwData2
Not used.

Return Values

The server should call the DdeCreateDataHandle function to create a data handle that identifies the data and then return the handle. The server should return NULL if it is unable to complete the transaction. If the server returns NULL, the client will receive a DDE_FNOTPROCESSED flag.

Remarks

This transaction is filtered if the server application specified the CBF_FAIL_REQUESTS flag in the DdeInitialize function.

If responding to this transaction requires lengthy processing, the server can return the CBR_BLOCK return code to suspend future transactions on the current conversation and then process the transaction asynchronously. When the server has finished and the data is ready to pass to the client, the server can call the DdeEnableCallback function to resume the conversation.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Ddeml.h; include Windows.h.

See Also

Dynamic Data Exchange Management Library Overview, Dynamic Data Exchange Management Transactions, DdeClientTransaction, DdeCreateDataHandle, DdeEnableCallback, DdeInitialize