Platform SDK: Interprocess Communications |
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.
To post this message, call the PostMessage function with the following parameters.
PostMessage( (HWND) hWnd, // handle to destination window WM_DDE_ADVISE, // message to send (WPARAM) wParam, // handle to client window (HWND) (LPARAM) lParam // advise and item atom );
The high-order word contains an atom that identifies the requested data item.
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.
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.
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.
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Dde.h; include Windows.h.
Dynamic Data Exchange Overview, Dynamic Data Exchange Messages, DDEADVISE, FreeDDElParam, GlobalAddAtom, GlobalAlloc, PackDDElParam, PostMessage, ReuseDDElParam, SendMessage, UnpackDDElParam, WM_DDE_ACK, WM_DDE_DATA, WM_DDE_POKE, WM_DDE_REQUEST