This section provides guidelines for implementing dynamic data exchange for applications that cannot use the Dynamic Data Exchange Management Library (DDEML). For more information about the DDEML, see
Dynamic Data Exchange Management Library.
Overviews
About Dynamic Data Exchange
This topic discusses transferring data between applications.
Using Dynamic Data Exchange
This topic provides code samples concerning dynamic data exchange.
Functions
DdeSetQualityOfService
The DdeSetQualityOfService function specifies the quality of service (QOS) a raw Dynamic Data Exchange (DDE) application desires for future DDE conversations it initiates. The specified QOS applies to any conversations started while those settings are in place. A DDE conversation's quality of service lasts for the duration of the conversation; calls to the DdeSetQualityOfService function during a conversation do not affect that conversation's QOS.
FreeDDElParam
The FreeDDElParam function frees the memory specified by the
lParam parameter of a posted DDE message. An application receiving a posted DDE message should call this function after it has used the UnpackDDElParam function to unpack the
lParam value.
ImpersonateDdeClientWindow
The ImpersonateDdeClientWindow function enables a DDE server application to impersonate a DDE client application's security context. This protects secure server data from unauthorized DDE clients.
PackDDElParam
The PackDDElParam function packs a DDE
ReuseDDElParam
The ReuseDDElParam function enables an application to reuse a packed DDE
UnpackDDElParam
The UnpackDDElParam function unpacks a DDElParam value received from a posted DDE message.
Messages
WM_DDE_INITIATE
A DDE client application sends a WM_DDE_INITIATE message to initiate a conversation with a server application responding to the specified application and topic names. Upon receiving this message, all server applications with names that match the specified application and that support the specified topic are expected to acknowledge it. (For more information, see the WM_DDE_ACK message.)
Notifications
WM_DDE_ACK
The WM_DDE_ACK message notifies a DDE application of the receipt and processing of the following messages: WM_DDE_POKE, WM_DDE_EXECUTE, WM_DDE_DATA, WM_DDE_ADVISE, WM_DDE_UNADVISE, WM_DDE_INITIATE, or WM_DDE_REQUEST (in some cases).
To post this message, call the PostMessage function with the following parameters.
WM_DDE_ADVISE
A DDE client application posts the WM_DDE_ADVISE message to a DDE server application to request the server to supply an update for a data item whenever the item changes.
To post this message, call the PostMessage function with the following parameters.
WM_DDE_DATA
A DDE server application posts a WM_DDE_DATA message to a DDE client application to pass a data item to the client or to notify the client of the availability of a data item.
To post this message, call the PostMessage function with the following parameters.
WM_DDE_EXECUTE
A DDE client application posts a WM_DDE_EXECUTE message to a DDE server application to send a string to the server to be processed as a series of commands. The server application is expected to post a WM_DDE_ACK message in response.
To post this message, call the PostMessage function with the following parameters.
WM_DDE_POKE
A DDE client application posts a WM_DDE_POKE message to a DDE server application. A client uses this message to request the server to accept an unsolicited data item. The server is expected to reply with a WM_DDE_ACK message indicating whether it accepted the data item.
To post this message, call the PostMessage function with the following parameters.
WM_DDE_REQUEST
A DDE client application posts a WM_DDE_REQUEST message to a DDE server application to request the value of a data item.
To post this message, call the PostMessage function with the following parameters.
WM_DDE_TERMINATE
A DDE application (client or server) posts a WM_DDE_TERMINATE message to terminate a conversation.
To post this message, call the PostMessage function with the following parameters.
WM_DDE_UNADVISE
A DDE client application posts a WM_DDE_UNADVISE message to inform a DDE server application that the specified item or a particular clipboard format for the item should no longer be updated. This terminates the warm or hot data link for the specified item.
To post this message, call the PostMessage function with the following parameters.
Structures
DDEACK
The DDEACK structure contains status flags that a DDE application passes to its partner as part of the WM_DDE_ACK message. The flags provide details about the application's response to the messages WM_DDE_DATA, WM_DDE_POKE, WM_DDE_EXECUTE, WM_DDE_ADVISE, WM_DDE_UNADVISE, and WM_DDE_REQUEST.
DDEADVISE
The DDEADVISE structure contains flags that specify how a DDE server application should send data to a client application during an advise loop. A client passes a handle to a DDEADVISE structure to a server as part of a WM_DDE_ADVISE message.
DDEDATA
The DDEDATA structure contains the data, and information about the data, sent as part of a WM_DDE_DATA message.
DDEPOKE
The DDEPOKE structure contains the data, and information about the data, sent as part of a WM_DDE_POKE message.
HSZPAIR
The HSZPAIR structure contains a DDE service name and topic name. A DDE server application can use this structure during an XTYP_WILDCONNECT transaction to enumerate the service-topic pairs that it supports.