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.
WM_DDE_ADVISE
wParam = (WPARAM) hwnd; // handle of posting application
lParam = (LPARAM) lPackedVal; // packed DDEADVISE and item atom
Parameters
hwnd
Value of wParam.
Identifies the client window posting the message.
lPackedVal
Value of lParam.
The component parameters packed into lPackedVal are extracted by calling
the UnpackDDElParam
Parameter |
Description |
hOptions |
Identifies
a global memory object containing a DDEADVISE |
aItem |
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
The client
application allocates hOptions by calling the GlobalAlloc
The client
application must create or reuse the WM_DDE_ADVISE lPackedVal parameter
by calling the PackDDElParam
If the
receiving (server) application responds with a negative WM_DDE_ACK
The fRelease
flag is not used in WM_DDE_ADVISE messages, but their data-freeing behavior is
similar to that of WM_DDE_DATA
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 aItem atom or
delete it and create a new one. If the WM_DDE_ACK message is positive, the
application should delete the hOptions object; otherwise, the
application should not delete the object.
The server
must create or reuse the WM_DDE_ACK lPackedVal parameter by calling the PackDDElParam
function or the ReuseDDElParam function with wStatus supplied as
the low-order word and aItem supplied as the high-order word.
See Also