편집

다음을 통해 공유


WM_DDE_ACK message

The WM_DDE_ACK message notifies a Dynamic Data Exchange (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.

#define WM_DDE_ACK     0x03E4

Parameters

wParam

When responding to WM_DDE_INITIATE, this parameter is a handle to the server window sending the message.

When responding to WM_DDE_EXECUTE, this parameter is a handle to the server window posting the message.

When replying to all other messages, this parameter is a handle to the client or server window posting the message.

lParam

When responding to WM_DDE_INITIATE, the low-order word contains an atom that identifies the replying application. The high-order word contains an atom that identifies the topic for which a conversation is being established.

When responding to WM_DDE_EXECUTE, the low-order word specifies a DDEACK structure containing a series of flags that indicate the status of the response. The high-order word is a handle to a global memory object that contains the command string that was received in the WM_DDE_EXECUTE message.

When replying to all other messages, the low-order word specifies a DDEACK structure containing a series of flags that indicate the status of the response. The high-order word contains a global atom that identifies the name of the data item for which the response is sent.

Remarks

Posting

Except in response to the WM_DDE_INITIATE message, the application posts the WM_DDE_ACK message by calling the PostMessage function, not by calling the SendMessage function. When responding to WM_DDE_INITIATE, the application sends the WM_DDE_ACK message by calling SendMessage. In this case, neither the application-name atom nor the topic-name atom should be NULL (even if the WM_DDE_INITIATE message specified NULL atoms).

When acknowledging any message with an accompanying atom, the application posting WM_DDE_ACK can either reuse the atom that accompanied the original message, or it can delete it and create a new one.

When acknowledging WM_DDE_EXECUTE, the application that posts WM_DDE_ACK should reuse the global memory object identified in the original WM_DDE_EXECUTE message.

All posted WM_DDE_ACK messages must create or reuse the lParam parameter by calling the PackDDElParam function or the ReuseDDElParam function.

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. Memory objects should not be freed if the fRelease flag is set to FALSE in WM_DDE_POKE and WM_DDE_DATA messages.

Receiving

The application that receives a WM_DDE_ACK message should delete all atoms accompanying the message. If the application receives a WM_DDE_ACK in response to a message with an accompanying global memory object, and the object was sent with the fRelease flags set to FALSE, the application is responsible for deleting the 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 global memory 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_DATA, WM_DDE_POKE, or WM_DDE_EXECUTE message, the application should delete the global memory object posted with the original WM_DDE_DATA, WM_DDE_POKE, or WM_DDE_EXECUTE message.

The application that receives a posted WM_DDE_ACK message must free the lParam parameter by using the FreeDDElParam function.

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Dde.h (include Windows.h)

See also

Reference

DDEACK

FreeDDElParam

PackDDElParam

PostMessage

ReuseDDElParam

SendMessage

UnpackDDElParam

WM_DDE_ADVISE

WM_DDE_DATA

WM_DDE_EXECUTE

WM_DDE_INITIATE

WM_DDE_POKE

WM_DDE_REQUEST

WM_DDE_TERMINATE

WM_DDE_UNADVISE

Conceptual

About Dynamic Data Exchange