Home

DDE Cold Link

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

  1. A DDE cold 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 request a particular data item by posting a WM_DDE_REQUEST message. If the server can supply the requested data item, it replies back to the client by posting a WM_DDE_DATA message. On receiving this WM_DDE_DATA message the client may or may not respond with WM_DDE_ACK (positive acknowledgment) depending on the flag set in WM_DDE_DATA message.

  3. When the client posts the WM_DDE_REQUEST message and the server cannot supply the requested data, then the server responds back by posting a WM_DDE_ACK message with "negative acknowledgment".

Like this the DDE conversation continues with the client posting WM_DDE_REQUEST messages to the server. In reply to which the server posts WM_DDE_DATA or WM_DDE_ACK message.

  1. 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 cold link conversation.

 

   Client                                    Server

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

 

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

 

               ----- WM_DDE_REQUEST ---->
                       (item)
              <----- WM_DDE_ACK -------
                     (negative)

 

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

 

In DDE cold link conversation the client "requests" for data and the server serves the request. If the data is being updated at the server, there is no way how the client can get a notification of the update. So in cold link conversation client has to continuously ask the server for data.