Platform SDK: Interprocess Communications |
A client uses the XTYP_CONNECT transaction to establish a conversation. A DDE server callback function, DdeCallback, receives this transaction when a client specifies a service name that the server supports (and a topic name that is not NULL) in a call to the DdeConnect function.
HDDEDATA CALLBACK DdeCallback( UINT uType, // XTYP_CONNECT 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 );
A server callback function should return TRUE to allow the client to establish a conversation on the specified service name and topic name pair, or the function should return FALSE to deny the conversation. If the callback function returns TRUE and a conversation is successfully established, the system passes the conversation handle to the server by issuing an XTYP_CONNECT_CONFIRM transaction to the server's callback function (unless the server specified the CBF_SKIP_CONNECT_CONFIRMS flag in the DdeInitialize function).
This transaction is filtered if the server application specified the CBF_FAIL_CONNECTIONS flag in the DdeInitialize function.
A server cannot block this transaction type; the CBR_BLOCK return code is ignored.
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.
Dynamic Data Exchange Management Library Overview, Dynamic Data Exchange Management Transactions, CONVCONTEXT, DdeConnect, DdeInitialize