Microsoft Windows CE 3.0  

PostQuitMessage

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 indicates to Windows that a thread has made a request to terminate (quit). It is typically used in response to a WM_DESTROYmessage.

void
PostQuitMessage(
int
nExitCode
);

Parameters

nExitCode
[in] Specifies an application exit code. This value is used as the wParamparameter of the WM_QUITmessage.

Return Values

None.

Remarks

The PostQuitMessagefunction posts a WM_QUIT message to the thread's message queue and returns immediately; the function simply indicates to the system that the thread is requesting to quit at some time in the future.

When the thread retrieves the WM_QUIT message from its message queue, it should exit its message loop and return control to the system. The exit value returned to the system must be the wParamparameter of the WM_QUIT message.

Requirements

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

GetMessage, PeekMessage, PostMessage, WM_DESTROY, WM_QUIT