Dynamic data exchange (DDE) involves passing data and instructions between applications running under the Microsoft Windows operating system. Typically the data is passed in the form of a string, which is interpreted when it is received. One application acts as a server and the other as a client .
The server is normally a passive object, which waits for a client object to tell it what to do. The client can communicate with the server in four ways:
For a transaction to take place between a client and a server, a conversation must be established. A conversation is established when a client makes a request by broadcasting a service name and topic name, and a server responds. Transactions can then take place across the conversation. When no more transactions are to be made, the conversation is terminated.
The following list identifies the elements involved with client/server activity:
A conversation is established when a server responds to a client.
A service name is a string broadcast by a client hoping to establish a conversation with a server that recognizes the service name. The service name is usually clearly related to the server application name.
The topic name identifies what the conversation between client and server is to be about. For example, it could be the name of a file that is open in the server application. Each topic is attached to one particular server. A server can have many topics.
The item usually identifies an element of the file identified by the topic which should be read (in the case of a request) or written to (in the case of a poke). For example, it might refer to a cell in a spreadsheet document.
A DDE advise loop describes a connection back to the application that is used to track changes to a DDE topic. It instructs the server to inform the client when data in the server's application changes. Advise loops are set up across a conversation, and closing the conversation closes the advise loop.
An advise loop is identified by an item and a key. The key is included to allow any number of uniquely identifiable advise loops to be set up on the same server/topic/item combination.
A successfully established advise loop is also known as a link. When a change occurs to item, the link informs the client by causing it to execute a function.
There are two types of link: the warm link which only informs the client that a change to item has occurred, and the hot link which also sends the new data across.
Note: a DDE advise loop is not a loop in the program source code. In particular it should not be confused with the "event loop" which is a loop in source code that processes low level events.
When a client issues an execute transaction to a server, the command to be executed is transferred as a string. This involves the marshalling of the command and its arguments into a suitable string format. The standard format of such a string is:
[command(arg1,arg2,...)]
LispWorks User Guide and Reference Manual - 13 Feb 2015