Chapter 6 DDE Library
© National Instruments Corporation 6-7 LabWindows/CVI Standard Libraries
Parameter Discussion
dataFormat must be a valid data format recognized by Microsoft Windows. The following are
the valid data formats supported by Microsoft Windows:
CF_TEXT CF_PALETTE
CF_BITMAP CF_PENDATA
CF_METAFILEPICT CF_RIFF
CF_SYLK CF_WAVE
CF_DIF CF_OWNERDISPLAY
CF_TIFF CF_DSPTEXT
CF_OEMTEXT CF_DSPBITMAP
CF_DIB CF_DSPMETAFILEPICT
The Microsoft Windows 3.x Programmer's Reference contains an in-depth discussion of DDE
programming and meaning of each data format type.
Using This Function
This function allows your program, acting as a DDE server, to send data to a client that has set
up a hot or warm link.
When a hot or warm link is set up, your server callback function receives a DDE_ADVISELOOP
transaction type (xType) for a particular data object (identified by itemName). When the hot or
warm link is terminated, your server callback function receives a DDE_ADVISESTOP
transaction type for the data object.
During the period when the hot or warm link is in effect, your server program is responsible for
notifying the client whenever the value of the data object changes. When the data object's value
changes, you can call this function, AdviseDDEDataReady, or
BroadcastDDEDataReady.
AdviseDDEDataReady differs from BroadcastDDEDataReady in that you specify a
particular conversation with a client. AdviseDDEDataReady sends the data only to the
specified client, even if other clients have hot or warm links to the same item.
AdviseDDEDataReady sends the data without invoking your server callback function.
However, if there are other clients with warm links to the same item, they are all notified that
new data is available. If they request the new data, your server callback function is invoked with
the DDE_REQUESTDATA message. If you do not want to send the data to those other clients,
you must write your server callback function so that it does not call ServerDDEWrite in this
case.
If you pass NULL (0) as the dataPointer and 0 as the dataSize, no data is sent to the specified
client. Instead, all clients with warm links to the item are notified. If they request the new data,
your server callback function is invoked with the DDE_REQUESTDATA message, and you can
use the ServerDDEWrite function to send the data in response.