Saturday, February 14, 2009

Dynamic Data Exchange (DDE)

Dynamic Data Exchange is a form of Inter-Process Communication (IPC) supported by the Win32 API. The DDE protocol consists of a set of messages and guidelines used to communicate between applications which share data and use shared memory to exchange data. DDE can be used for one-time data transfers and for ongoing exchanges, in which applications send updates as new data becomes available. Quite commonly, DDE applications may support both client and server capabilities within a single application, though this is not required.

The WIN32 API includes the Dynamic Data Exchange Management Library (DDEML) in the form of a dynamic link library (DLL) which applications running under windows can use to share data. The DDEML provides an API that simplifies the task of incorporating DDE functionality in Win32 based applications.

Rather than posting DDE transactions directly, an application using DDEML calls the provided API functions to manage the DDE conversations.

A DDE conversation is the interaction between a DDE client and a DDE server application.

DDEML also provides facilities for managing the strings and data shared between DDE applications. In lieu of using pointers to shared memory objects, DDE applications create and exchange string handles for string data, and data handles, which identify memory data objects.

Using DDEML, a DDE server can register the service names supported. The registered names are broadcast to other applications on the system and these applications can then use the service names to connect to the server. Further, the DDEML provides compatibility between DDE applications by forcing them to implement DDE protocols in a consistent fashion. Existing applications using the message-based DDE protocol are fully compatible with applications using DDEML. That is, an application using message-based DDE can establish a conversation and carry out transactions with DDEML-based applications without any special provisions or changes in protocol.

However, because the DDEML library greatly simplifies developing and implementing both DDE clients and servers, applications should use DDEML rather than programming or DDE messaging directly. Using the DDEML API requires including the DDEML header in the application source files, linking with the DDEML library, and, of course, ensuring that the DDEML dynamic link library is in the systems search path.

Net DDE (Network Dynamic Data Exchange)

NetDDE is a networked version of the DDE protocol, which serves as a virtual hot-link by providing automatic updates to shared memory areas across a network. NetDDE provides information-exchange capabilities by opening two one-way pipes between the local and remote applications.
A Net DEE link can exchange information at any time. The Net DDE services are not opened automatically but can be established using Control Panel services, from the command prompt or through the Server Manager Utility from the Windows NT Server.

No comments:

Post a Comment