WM_COPYDATA

Windows CE 3.0

This message is sent when an application passes data to another application.

WM_COPYDATA wParam = (WPARAM)(HWND) hwnd; 
lParam = (LPARAM)(PCOPYDATASTRUCT) pcds;

Parameters

hwnd
Handle to the window passing the data.
pcds
Pointer to a COPYDATASTRUCT structure that contains the data to be passed.

Return Values

If the receiving application processes this message, it should return TRUE; otherwise, it should return FALSE.

Remarks

An application must use the SendMessage function to send this message, not the PostMessage function.

The data being passed must not contain pointers or other references to objects not accessible to the application receiving the data.

While this message is being sent, the referenced data must not be changed by another thread of the sending process.

The receiving application should consider the data read-only. The pcds parameter is valid only during the processing of the message. The receiving application should not free the memory referenced by pcds. If the receiving application must access the data after SendMessage returns, it must copy the data into a local buffer.

For Windows CE versions 1.0 through 2.11, pcds cannot be a global or static variable. This causes the COPYDATASTRUCT structure to be corrupt when it reaches its destination. Later versions of Windows CE do not have this restriction.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Winuser.h    
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

PostMessage, SendMessage


 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.

Show: