Home
DDE Hot Link
Following are the steps of exchanging the
messages between client and server engaged in DDE hot link conversation:
- A DDE hot 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.
- The client then indicates the data item
it requires by posting a WM_DDE_ADVISE message. 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.
Now the server is responsible to notify the
client whenever the value of the data item changes. The notification used is
WM_DDE_DATA.
- When the value of the data item is
changes the server posts WM_DDE_DATA message, to which the client may or may
not reply with WM_DDE_ACK message (The reply depends on the flag set in
WM_DDE_DATA message).
- 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 and in reply to which the server acknowledges with WM_DDE_ACK
message.
- 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 hot link
conversation.
Client
Server
---- WM_DDE_INITIATE --->
(application, topic)
<----- WM_DDE_ACK -------
----- WM_DDE_ADVISE ---->
(item)
<----- WM_DDE_ACK ------
<----- WM_DDE_DATA ------
(item)
----- [WM_DDE_ACK] ----->
---- WM_DDE_UNADVISE --->
(item)
<----- WM_DDE_ACK ------
---- WM_DDE_TERMINATE --->
<-- WM_DDE_TERMINATE ----
DDE hot link solves the problem that one
may face using the DDE cold link. The problem of not getting the updated data
from the server automatically.