|Navigation: Language Reference > App A - DDE, OLE, and OCX > Dynamic Data Exchange >====== DDE Overview ======|
Dynamic Data Exchange (DDE) is a very powerful Windows tool that allows a user to access data from another separately executing Windows application. This allows the user to work with the data in its native format (in the originating application), while ensuring that the application in which the data is used always has the most current values.
DDE is based upon establishing “conversations” (links) between two concurrently executing Windows applications. One of the applications acts as the DDE server to provide the data, and the other is the DDE client that receives the data. A single application may be both a DDE client and server, getting data from other applications and providing data to other applications. Multiple DDE “conversations” can occur concurrently between any given DDE server and client.
To be a DDE server, a Clarion application must:
·Open at least one window, since all DDE servers must be associated with a window (and its ACCEPT loop).
·Register with Windows as a DDE server, using the DDESERVER procedure.
·Provide the requested data to the client, using the DDEWRITE statement.
·When DDE is no longer required, terminate the link by using the DDECLOSE statement. You can also allow it to terminate when the user closes the server application or the window that started the link.
To be a DDE client, a Clarion application must:
·Open at least one window, since all DDE events must be processed with a window's ACCEPT loop.
·Open a link to a DDE server as its client, using the DDECLIENT procedure.
·Ask the server for data, using the DDEREAD statement, or ask the server for a service using the DDEEXECUTE statement.
·When DDE is no longer required, terminate the link by using the DDECLOSE statement. You can also allow it to terminate automatically when the user closes the client window or application.
The DDE procedures are prototyped in the DDE.CLW file, which you must INCLUDE in your program's MAP structure. The DDE process posts DDE-specific field-independent events to the ACCEPT loop of the window that opened the link between applications as a server or client.