Microsoft Windows CE 3.0  

PostThreadMessage

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function places a message in the message queue of the specified thread and then returns without waiting for the thread to process the message.

BOOL
PostThreadMessage(
DWORD
idThread
,
UINT
Msg
,
WPARAM
wParam
,
LPARAM
lParam
);

Parameters

idThread
[in] Identifier of the thread to which the message will be posted.
Msg
[in] Specifies the type of message to be posted.
wParam
[in] Specifies additional message-specific information.
lParam
[in] Specifies additional message-specific information.

Return Values

Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError. GetLastErrorreturns ERROR_INVALID_THREAD_ID if idThreadis not a valid thread identifier.

Remarks

The thread to which the message is posted retrieves the message by calling the GetMessageor PeekMessagefunction. The hwndmember of the returned MSGstructure is NULL.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Winuser.h   Coredll.lib, Msgque.lib
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

GetCurrentThreadId, GetLastError, GetMessage, MSG, PeekMessage, PostMessage