Platform SDK: Interprocess Communications |
A client uses the XTYP_ADVSTART transaction to establish an advise loop with a server. A DDE server callback function, DdeCallback, receives this transaction when a client specifies XTYP_ADVSTART as the uType parameter of the DdeClientTransaction function.
HDDEDATA CALLBACK DdeCallback( UINT uType, // XTYP_ADVSTART 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 an advise loop on the specified topic name and item name pair, or FALSE to deny the advise loop. If the callback function returns TRUE, any subsequent calls to the DdePostAdvise function by the server on the same topic name and item name pair causes the system to send XTYP_ADVREQ transactions to the server.
If a client requests an advise loop on a topic name, item name, and data format for an advise loop that is already established, the Dynamic Data Exchange Management Library (DDEML) does not create a duplicate advise loop but instead alters the advise loop flags (XTYPF_ACKREQ and XTYPF_NODATA) to match the latest request.
This transaction is filtered if the server application specified the CBF_FAIL_ADVISES flag in the DdeInitialize function.
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, DdeClientTransaction, DdeInitialize, DdePostAdvise