Platform SDK: Interprocess Communications

XTYP_DISCONNECT

An application's DDE callback function, DdeCallback, receives the XTYP_DISCONNECT transaction when the application's partner in a conversation uses the DdeDisconnect function to terminate the conversation.

HDDEDATA CALLBACK DdeCallback(
  UINT uType,     // XTYP_DISCONNECT
  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
Not used.
hconv
Handle to that the conversation was terminated.
hsz1
Not used.
hsz2
Not used.
hdata
Not used.
dwData1
Not used.
dwData2
Specifies whether the partners in the conversation are the same application instance. If this parameter is 1, the partners are the same instance. If this parameter is 0, the partners are different instances.

Remarks

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

The application can obtain the status of the terminated conversation by calling the DdeQueryConvInfo function while processing this transaction. The conversation handle becomes invalid after the callback function returns.

An application 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, DdeDisconnect, DdeInitialize, DdeQueryConvInfo