Platform SDK: Interprocess Communications

XTYP_ADVREQ

The XTYP_ADVREQ transaction informs the server that an advise transaction is outstanding on the specified topic name and item name pair and that data corresponding to the topic name and item name pair has changed. The system sends this transaction to the DDE callback function, DdeCallback, after the server calls the DdePostAdvise function.

HDDEDATA CALLBACK DdeCallback(
  UINT uType,     // XTYP_ADREQ
  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 data should be submitted to the client.
hconv
Handle to the conversation.
hsz1
Handle to the topic name.
hsz2
Handle to the item name that has changed.
hdata
Not used.
dwData1
Specifies the count, in the low-order word, of XTYP_ADVREQ transactions that remain to be processed on the same topic, item, and format name set within the context of the current call to the DdePostAdvise function. The count is zero if the current XTYP_ADVREQ transaction is the last one. A server can use this count to determine whether to create an HDATA_APPOWNED data handle for the advise data.

The low-order word is set to CADV_LATEACK if the Dynamic Data Exchange Management Library (DDEML) issued the XTYP_ADVREQ transaction because of a late-arriving DDE_ACK message from a client being outrun by the server.

The high-order word is not used.

dwData2
Not used.

Return Values

The server should first call the DdeCreateDataHandle function to create a data handle that identifies the changed data and then return the handle. The server should return NULL if it is unable to complete the transaction.

Remarks

A server cannot block this transaction type; the CBR_BLOCK return code is ignored.

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, DdeCreateDataHandle, DdeInitialize, DdePostAdvise