#include <dde.h>
WM_DDE_ACK
wParam = (WPARAM) hwnd; /* handle of posting window */
lParam = MAKELPARAM(wLow, wHigh); /* depending on received message */
The WM_DDE_ACK message notifies an application of the receipt and processing of a WM_DDE_INITIATE, WM_DDE_EXECUTE, WM_DDE_DATA, WM_DDE_ADVISE, WM_DDE_UNADVISE, or WM_DDE_POKE message, and in some cases, of a WM_DDE_REQUEST message.
hwnd
Value of wParam. Specifies the handle of the window posting the message.
wLow
Value of the low-order word of lParam. Specifies data as follows, depending on the message to which the WM_DDE_ACK message is responding:
Message | Parameter | Description |
WM_DDE_INITIATE | aApplication | An atom that contains the name of the replying application. |
WM_DDE_EXECUTE and all other messages | wStatus | A series of flags that indicate the status of the response. |
wHigh
Value of high-order word of lParam. Specifies data as follows, depending on the message to which the WM_DDE_ACK message is responding:
Message | Parameter | Description |
WM_DDE_INITIATE | aTopic | An atom that contains the topic with which the replying server window is associated. |
WM_DDE_EXECUTE | hCommands | A handle that identifies the data item containing the command string. |
All other messages | aItem | An atom that specifies the data item for which the response is sent. |
This message does not return a value.
The wStatus word consists of a DDEACK data structure. The DDEACK structure has the following form:
#include <dde.h>
typedef struct tagDDEACK { /* ddeack */
WORD bAppReturnCode:8,
reserved:6,
fBusy:1,
fAck:1;
} DDEACK;
For a full description of this structure, see Chapter 3, “Structures.”
Posting
Except in response to the WM_DDE_INITIATE message, the application posts the WM_DDE_ACK message by calling the PostMessage function, not the SendMessage function. When responding to WM_DDE_INITIATE, the application sends the WM_DDE_ACK message by calling SendMessage.
When acknowledging any message with an accompanying aItem atom, the application posting WM_DDE_ACK can either reuse the aItem atom that accompanied the original message or delete it and create a new one.
When acknowledging WM_DDE_EXECUTE, the application that posts WM_DDE_ACK should reuse the hCommands object that accompanied the original WM_DDE_EXECUTE message.
If an application has initiated the termination of a conversation by posting WM_DDE_TERMINATE and is awaiting confirmation, the waiting application should not acknowledge (positively or negatively) any subsequent messages sent by the other application. The waiting application should delete any atoms or shared memory objects received in these intervening messages (but should not delete the atoms in response to the WM_DDE_ACK message).
Receiving
The application that receives WM_DDE_ACK should delete all atoms accompanying the message.
If the application receives WM_DDE_ACK in response to a message with an accompanying hData object, the application should delete the hData object.
If the application receives a negative WM_DDE_ACK message posted in reply to a WM_DDE_ADVISE message, the application should delete the hOptions object posted with the original WM_DDE_ADVISE message.
If the application receives a negative WM_DDE_ACK message posted in reply to a WM_DDE_EXECUTE message, the application should delete the hCommands object posted with the original WM_DDE_EXECUTE message.
DDEACK, PostMessage, WM_DDE_ADVISE, WM_DDE_DATA, WM_DDE_EXECUTE, WM_DDE_INITIATE, WM_DDE_POKE, WM_DDE_REQUEST, WM_DDE_TERMINATE, WM_DDE_UNADVISE