WM_DDE_ADVISE message

A Dynamic Data Exchange (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.

#define WM_DDE_ADVISE      0x03E2

Parameters

wParam

A handle to the client window posting the message.

lParam

The low-order word is a handle to a global memory object containing a DDEADVISE structure that specifies how the data is to be sent.

The high-order word contains an atom that identifies the requested data item.

Remarks

If a client application supports more than one clipboard format for a single topic and item, it can post multiple WM_DDE_ADVISE messages for the topic and item, specifying a different clipboard format with each message. Note that a server can support multiple formats only for hot data links, not warm data links.

Posting

The client application posts the WM_DDE_ADVISE message by calling the PostMessage function, not the SendMessage function.

The client application allocates the global memory object using the GlobalAlloc function. It allocates the atom using the GlobalAddAtom function.

The client application must create or reuse the WM_DDE_ADVISE lParam parameter by calling the PackDDElParam function or the ReuseDDElParam function.

If the receiving (server) application responds with a negative WM_DDE_ACK message, the posting application must delete the object.

The fRelease flag is not used in WM_DDE_ADVISE messages, but their data-freeing behavior is similar to that of WM_DDE_DATA and WM_DDE_POKE messages where fRelease is TRUE.

Receiving

The server application posts the WM_DDE_ACK message to respond positively or negatively. When posting WM_DDE_ACK, the application can reuse the atom or delete it and create a new one. If the WM_DDE_ACK message is positive, the application should delete the global memory object; otherwise, the application should not delete the object.

The server must create or reuse the WM_DDE_ACK lParam parameter by calling the PackDDElParam function or the ReuseDDElParam 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

DDEADVISE

FreeDDElParam

GlobalAddAtom

PackDDElParam

PostMessage

ReuseDDElParam

SendMessage

UnpackDDElParam

WM_DDE_ACK

WM_DDE_DATA

WM_DDE_POKE

WM_DDE_REQUEST

Conceptual

About Dynamic Data Exchange