Home

DDE Warm Link

Following are the steps of exchanging the messages between client and server engaged in DDE warm link conversation:

  1. A DDE warm link conversation start with client broadcasting WM_DDE_INITIATE message identifying the application and topic it requires. Application and topic are optional, if a client wants to talk with any server, application can be set to NULL. If the client wants to use any topic, topic can be set to NULL. A server application that supports the specified topic responds to the client with a WM_DDE_ACK message.

  2. The client then indicates the data item it requires by posting a WM_DDE_ADVISE message. Along with the WM_DDE_ADVISE message is passed a flag which indicates that the client wishes only to be notified of changes in data, without the changed data being send immediately. If the server can supply the requested data item, it replies back to the client by posting a WM_DDE_ACK message with "positive acknowledgment"; a "negative acknowledgment" indicates that the server cannot.

  3. Now the server posts WM_DDE_DATA message with NULL data whenever the data item is updated. In reply to which the client has to send a WM_DDE_ACK message.

  4. Now whenever the client needs the data from the server it posts WM_DDE_REQUEST message to the server (similar to cold link). The server replies with WM_DDE_DATA message along with the data. The client on receiving the WM_DDE_DATA message can reply back with WM_DDE_ACK (positive acknowledgment) depending on the flag passed in WM_DDE_ACK message.

  5. When the client no more needs to get the notification of the update of data items, it posts a WM_DDE_UNADVISE message to the server (similar to hot link) and in reply to which the server acknowledges with WM_DDE_ACK message.

  6. To terminate the conversation, client and server posts WM_DDE_TERMINATE messages to each other. In most of the cases its client who first post this message but this is not always the case. Sometimes the server may want to terminate the conversation, in which case he can first post the WM_DDE_TERMINATE message.

Following picture shows the sequence of message exchange between the client and server engaged in DDE warm link conversation.

 

   Client                                    Server

               ---- WM_DDE_INITIATE --->
                (application, topic)
              <----- WM_DDE_ACK -------

 

               ----- WM_DDE_ADVISE ---->
                       (item)
              <----- WM_DDE_ACK ------

 

               <----- WM_DDE_DATA ------
                     (NULL item)
              ------ WM_DDE_ACK ------>

 

               ----- WM_DDE_REQUEST ---->
                       (item)
              <----- WM_DDE_DATA ------
                       (item)
              ------ [WM_DDE_ACK] ----->
                      (positive)

 

               ---- WM_DDE_UNADVISE --->
                       (item)
              <----- WM_DDE_ACK ------

 

               ---- WM_DDE_TERMINATE --->
              <-- WM_DDE_TERMINATE ----

 

DDE warm link combines the good features of both DDE cold link and DDE hot link. The problem with DDE cold link is that the client do not get any notification when the data on the server gets updated. This problem is solved in DDE hot link but then DDE hot link also introduces one problem. If the data on the server is getting update too frequently then the client may not be interested in receiving the whole data every time its updated.

In DDE warm link the server just sends a notification that the data item is being updated. Now if the client wants the updated data he can send a request to the server to get the updated data.