External Interfaces |
Dynamic Data Exchange (DDE)
Note This section documents the MATLAB interface to the Dynamic Data Exchange (DDE) technology. As of MATLAB version 5.1, all development work for the DDE Server and Client has been stopped and no further development will be done. The MathWorks strongly recommends that you migrate to the MATLAB interface to COM technology that is documented at the beginning of the section COM and DDE Support (Windows Only). |
MATLAB provides functions that enable MATLAB to access other Windows applications and for other Windows applications to access MATLAB in a wide range of contexts. These functions use dynamic data exchange (DDE), software that allows Microsoft Windows applications to communicate with each other by exchanging data.
This section describes using DDE in MATLAB:
Applications communicate with each other by establishing a DDE conversation. The application that initiates the conversation is called the client. The application that responds to the client application is called the server.
When a client application initiates a DDE conversation, it must identify two DDE parameters that are defined by the server:
When a server application receives a request for a conversation involving a supported topic, it acknowledges the request, establishing a DDE conversation. The combination of a service and a topic identifies a conversation uniquely. The service or topic cannot be changed for the duration of the conversation, although the service can maintain more than one conversation.
During a DDE conversation, the client and server applications exchange data concerning items. An item is a reference to data that is meaningful to both applications in a conversation. Either application can change the item during a conversation. These concepts are discussed in more detail below.
The Service Name
Every application that can be a DDE server has a unique service name. The service name is usually the application's executable filename without any extension. Service names are not case sensitive. Here are some commonly used service names:
For the service names of other Windows applications, refer to the application documentation.
The Topic
The topic defines the subject of a DDE conversation and is usually meaningful to both the client and server applications. Topic names are not case sensitive. MATLAB topics are System and Engine and are discussed in Accessing MATLAB as a Server. Most applications support the System topic and at least one other topic. Consult your application documentation for information about supported topics.
The Item
Each topic supports one or more items. An item identifies the data being passed during the DDE conversation. Case sensitivity of items depends on the application. MATLAB Engine items are case sensitive if they refer to matrices because matrix names are case sensitive.
DDE uses the Windows clipboard formats for formatting data sent between applications. As a client, MATLAB supports only Text format. As a server, MATLAB supports Text, Metafilepict, and XLTable formats, described below:
null
character. Lines of text in the buffer are delimited by a carriage return line-feed combination. If the buffer contains columns of data, those columns are delimited by the tab character. MATLAB supports Text format for obtaining the results of a remote EvalString command and requests for matrix data. Also, matrix data can be sent to MATLAB in Text format.
Additional Automation Server Information | Accessing MATLAB as a Server |
© 1994-2005 The MathWorks, Inc.