A client application sends a WM_DDE_POKE message to send unsolicited data to a server application. The server application is expected to reply with a WM_DDE_ACK message indicating if it accepted the data or not.
wParam
Contains the handle of the window posting the message.
lParam
Consists of hDdePoke, a global handle to a DDEPOKESTRUCT structure which describes the available data and what format it is in.
lParam contains a global memory handle which references a DDEPOKESTRUCT data structure. It contains the following information:
Name | Content |
hData | This is a handle that identifies the global memory object containing the data and additional information. |
aItem | An atom that identifies the data item offered to the server application. |
The WM_DDE_POKE message may be sent using either the PostMessage or SendMessage functions. If the SendMessage function is used, the sending application will not continue until the server has processed the message. If the PostMessage function is used, the message is placed in the server's message queue and the sending application continues to execute. Normally, and application will use the PostMessage function.
Memory for the hDdePoke (which references a DDEPOKESTRUCT structure) and for hData (which references a DDEPOKE structure) must be allocated by using the GlobalAlloc function with the GMEM_DDESHARE option. The receiving application must be responsible for freeing the hDdePoke and hData objects after extracting their contents.
The data consists of a DDEPOKE structure.
The DDEPOKE structure has the following form:
typedef struct { /* ddpk */
unsigned short unused:13,
fRelease:1,
fReserved:2;
short cfFormat;
BYTE Value[1];
} DDEPOKE;
If the WM_DDE_POKE message is sent using the PostMessage function, the application must not terminate until it has received acknowledgement from the server application. Otherwise, Windows will free the memory containing the data as part of the application-termination procedure.
WM_DDE_DATA