This 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.
wParam
Contains the handle of the window posting the message.
lParam
The meaning of this parameter depends on the message to which the WM_DDE_ACK message is responding.
When responding to WM_DDE_INITIATE:
Argument | Description |
aApplication | Low-order word of lParam. An atom that contains the name of the replying application. |
aTopic | High-order word of lParam. An atom that contains the topic with which the replying server window is associated. |
When responding to WM_DDE_EXECUTE:
Argument | Description |
hDdeAckExecute | A global handle to a DDEACKEXECUTESTRUCT structure which holds the status flags of the response as well as an additional handle identifying the command string. |
When replying to all other messages:
Argument | Description |
wStatus | Low-order word of lParam. A series of flags that indicate the status of the response. |
aItem | High-order word of lParam. An atom that specifies the data item for which the response is sent. |
The DDEACKEXECUTESTRUCT contains the following information:
Name | Content |
wStatus | A series of flags that indicate the status of the response. See description of DDEACK data structure. |
hCommands | A handle that identifies the data item containing the command string. |
The wStatus word consists of a DDEACK data structure that contains the following information:
Bit | Name | Meaning |
15 | fAck | 1 = Request accepted. |
0 = Request not accepted. | ||
14 | fBusy | 1 = Busy. An application is expected to set fBusy if it is unable to respond to the request at the time it is received. The fBusy flag is defined only when fAck is zero. |
0 = Not busy. | ||
13–8 | Reserved | |
7–0 | bAppReturnCode | Application-specific return codes. |
Posting
Except in response to the WM_DDE_INITIATE message, post the WM_DDE_ACK message by calling the PostMessage function, not SendMessage. When responding to WM_DDE_INITIATE, send the WM_DDE_ACK message with SendMessage.
When acknowledging any message with an accompanying aItem atom, the application that sends WM_DDE_ACK can reuse the aItem atom that accompanied the original message, or it may delete it and create a new one.
When acknowledging WM_DDE_EXECUTE, the application that sends 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 sending WM_DDE_TERMINATE and is awaiting confirmation, the waiting application should not acknowledge (positively or negatively) any subsequent message sent by the other application. The waiting application should delete any atoms or shared memory objects received in these intervening messages.
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 sent in reply to a WM_DDE_ADVISE message, the application should delete the hOptions object sent with the original WM_DDE_ADVISE message.
If the application receives a negative WM_DDE_ACK message sent in reply to a WM_DDE_EXECUTE message, the application should delete the hCommands object sent with the original WM_DDE_EXECUTE message.