National Instruments 320682C Musical Toy Instrument User Manual


 
DDE Library Chapter 6
LabWindows/CVI Standard Libraries 6-4 © National Instruments Corporation
Table 6-2. DDE Transaction Types (xType)
xType Server Client When ?
DDE_CONNECT
Y N When a new client requests a
connection.
DDE_DISCONNECT
Y Y When conversation partner quits.
DDE_DATAREADY
Y Y When conversation partner sends
data.
DDE_REQUESTDATA
Y N When client requests data.
DDE_ADVISELOOP
Y N When client requests advisory loop.
DDE_ADVISESTOP
Y N When client terminates request for
advisory loop.
DDE_EXECUTE
Y N When client requests execution of a
command.
Refer to the description for RegisterDDEServer and ConnectToDDEServer for more
information about the DDE callback function.
DDE Links
Whenever a client program needs to be informed of changes to the value of a particular data item
in the server application, a DDE data link is required. You can establish a DDE data link in
LabWindows/CVI by calling the SetUpDDEWarmLink or SetUpDDEHotLink functions.
Whenever the data value changes, the client callback function is triggered, and the data is
available in the dataPtr parameter.
Within one client-server connection, there can be multiple data links, each applying to a different
data item. For example, you can establish a link between your LabWindows/CVI program and a
particular cell in Excel. The data item to which the link applies is specified in the itemName
parameter in the call to SetUpDDEWarmLink or SetUpDDEHotLink functions.
As defined in Windows, warm and hot links differ in that under a warm link the client is merely
alerted when the data value changes, whereas under a hot link the data is actually sent.
LabWindows/CVI makes no distinction between warm links and hot links. In both cases, your
client application receives the data through the client callback function when the data value
changes. (If a warm link is in effect, LabWindows/CVI requests and receives the data from the
server before the callback function is called.) The SetUpDDEWarmLink and
SetUpDDEHotLink functions are provided because some DDE server applications offer only
one type of link.