National Instruments 320682C Musical Toy Instrument User Manual


 
DDE Library Chapter 6
LabWindows/CVI Standard Libraries 6-18 © National Instruments Corporation
This function registers your program as a DDE server with the specified name. Clients
attempting to connect to your program must use the specified name. Thereafter, all requests by
the client will be routed through the specified serverCallbackFunction.
You can register your program as a DDE server multiple times as long as you specify different
server names.
Note: The callback function should return TRUE if the request is successful else return
FALSE. The callback function should be short and should return as soon as possible.
callbackData is a four-byte value that will be passed to the callback function each time it is
called for this server.
You can define the meaning of the callback data. The following are examples of how the
callback data can be used:
1. You can register your program as a DDE server multiple times under different names. For
instance, you can use the same callback function for all of the server instances by using the
callback data to differentiate between them.
2. You can use the callback data to point to a data object that you need to access in the callback
function. In this way, you would not need to declare the data object as a global variable.
If you do not want to use the callback data, you can pass zero.
Note: In the case of DDE_DISCONNECT, the value of callbackData is undefined.
See Also
ConnectToDDEServer, UnregisterDDEServer