DDE Clients and Servers
Interprocess communication with DDE involves a client and a server in each DDE conversation. A DDE server can execute commands another application sends and can send and receive information to and from a client application. A DDE client can send commands to a server application to execute and can request data from a server application. With the LabWindows/CVI DDE Support Library, you can write programs that act as a DDE client or server.
To connect to a DDE server from a LabWindows/CVI program, you must know some information about the application to which you want to connect. All DDE server applications have a name and a topic that defines the connection. For example, you can connect to Microsoft Excel in two ways with the ConnectToDDEServer function. If you want Excel to perform tasks, such as opening worksheets and creating charts when you send commands, you should specify excel as the server name and system as the topic name in the call to ConnectToDDEServer. However, if you want to send data to an Excel spreadsheet, you should specify excel as the server name and the filename of the worksheet that is already loaded in Excel as the topic name.
If your program acts as a DDE server, to which other Windows applications send and receive commands and data, you need to call RegisterDDEServer in your program. RegisterDDEServer establishes your program as a valid DDE server so that other applications can connect to it and exchange information. After you call RegisterDDEServer, you can invoke the server callback function.