Chapter 6 DDE Library
© National Instruments Corporation 6-3 LabWindows/CVI Standard Libraries
DDE callback functions used in a program that acts as a DDE server can be triggered in a
number of ways from client applications. Whenever a client application attempts to connect to
your server program or requests information from your program, the callback function in your
program is executed to process the request. The parameter prototypes for the DDE callback
functions in LabWindows/CVI are defined below:
int CallbackFunction (int handle, char *topicName,
char *itemName, int xType, int dataFmt,
int dataSize, void *dataPtr,
void *callbackData);
Parameters
Input handle The conversation handle which uniquely identifies the client
server connection.
topicName The server application triggering the callback.
itemName The data item within the server application that triggers the
callback. Exception: When xType is DDE_EXECUTE,
itemName represents the command string from the client
program.
xtype The transaction type (see Table 6-2).
dataFmt The format of the data being transmitted.
dataSize The number of bytes in the data. May actually be greater
than the number of bytes transmitted. It is recommended
that you encode size information in your data.
dataPtr Points to the transmitted data.
callbackData A user-defined data value.
Note: The value of the dataSize parameter is greater than or equal to the actual size of
the data. It is recommended that you encode size information in your data.
Return Value
The callback function should return 1 to indicate success or 0 to indicate failure or rejection of
the requested action.
Transaction Types
All of the DDE transaction types (xType) that can trigger a callback function are listed in
Table 6-2.