Home

Dynamic Data Exchange

DDE is a protocol that defines a set of messages and rules that governs the way the messages are to be exchanged. The client and server exchange the messages and share data using shared memory. The DDE protocol can be used for a one time data exchange or continuous exchange in which case the server sends update to client as new data becomes available.

DDE makes use of the messaging architecture of Windows to exchange messages between the applications. Since Win32 messages contain only two parameters wParam and lParam to pass data, as a result these parameters have to indirectly refer to a group of data when multiple values are to be passed along with the message. DDE protocol define exactly how applications should use the wParam and lParam to pass larger piece of data.

NOTE: The messages used by the DDE protocol are defined in "dde.h" header file.

 

Client, Server and Conversation

Two application participating in DDE are said to be engaged in a DDE conversation. DDE Client is the application that initiates the conversation. DDE Sever is a application that responds to the client's request. An application can be engaged in many conversations at a given time, acting as Server in some and client in others.

Since the DDE defines a set of messages that are to be exchanged. It requires that the DDE conversation must take place between two windows, as messages can be send only to windows. Thus, there are two windows involved in one DDE conversation. A DDE conversation is identified by a pair of handles (those that of the windows involved in that DDE conversation), so no windows should be engaged in more than one DDE conversation.

 

Application, Topic and Item

DDE protocol identifies the units of data passed between the client and server with a three-level hierarchy of application, topic and item name.

At the beginning of a DDE conversation, the client and server determines the application name and topic, that uniquely define the DDE conversation. Usually the application name is the name of the server application. For example, when MS Excel acts as a server, the application name is Excel.

The DDE topic is a general classification of data within which multiple data items may be exchanged during the DDE conversation. Applications that operate on file-based documents, the topic usually is the filename.

A DDE data item is information related to the conversation topic exchanged between the applications. Values for the data item are send from server to client.

 

Types of DDE Conversation

There are three basic types of DDE conversations:

Cold Link
Hot Link
Warm Link