WM_DDE_DATA
A DDE server
application posts a WM_DDE_DATA message to a DDE client application to pass a
data item to the client or to notify the client of the availability of a data
item.
WM_DDE_DATA
wParam = (WPARAM) hwnd; // handle of posting application
lParam = (LPARAM) lPackedVal; // packed DDEDATA and item atom
Parameters
hwnd
Value of wParam.
Identifies the server window posting the message.
lPackedVal
Value of lParam.
The component parameters that are packed into lPackedVal are extracted
by calling the UnpackDDElParam
Parameter |
Description |
hData |
Identifies
a global memory object containing a DDEDATARNRBH. structure with the data and additional information.
The handle should be set to NULL if the server is notifying the client that
the data-item value has changed during a warm data link. A warm link is
established by the client sending a WM_DDE_ADVISE message with the fDeferUpd
bit set. |
aItem |
Contains an
atom that identifies the data item for which the data or notification is
sent. |
Remarks
Posting
The server
application posts the WM_DDE_DATA message by calling the PostMessage
The server
application allocates hData by calling the GlobalAlloc
The server
must create or reuse the WM_DDE_DATA lPackedVal parameter by calling the
PackDDElParam
If the
receiving (client) application responds with a negative WM_DDE_ACK
If the server
application sets the fRelease member of the DDEDATA
The server
application should not set both the fAckReq and fRelease members
of the DDEDATA structure to FALSE. If both members are set to FALSE, it
is impossible for the server to determine when to delete hData.
Receiving
If fAckReq
is TRUE, the client application should post the WM_DDE_ACK
The client
must create or reuse the WM_DDE_ACK lPackedVal parameter by calling the PackDDElParam
If fAckReq
is FALSE, the client application should delete the aItem atom.
If the
posting (server) application specified hData as NULL, the receiving
(client) application can request the server to send the data by posting a
WM_DDE_REQUEST message.
After
processing a WM_DDE_DATA message in which hData is not NULL, the client
should free hData, unless one of the following conditions is true:
The fRelease member is
FALSE.
The fRelease member is
TRUE, but the client application responds with a negative WM_DDE_ACK message.
See Also