---
name: "PostQuitMessage"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/PostQuitMessage"
---

# PostQuitMessage(3w)

## NAME

**PostQuitMessage** (USER32.@)

## SYNOPSIS

void PostQuitMessage\
  (\
   INT *exit\_code*\
  )

## DESCRIPTION

Posts a quit message to the current thread's message queue.

## PARAMS

*exit\_code* **\[In\]**  Exit code to return from message loop.

## RETURNS

Nothing.

## NOTES

This function is not the same as calling: \
 PostThreadMessage(GetCurrentThreadId(), WM\_QUIT, exit\_code, 0);

It instead sets a flag in the message queue that signals it to generate a **WM\_QUIT** message when there are no other pending sent or posted messages in the queue.

## IMPLEMENTATION

Declared in **"winuser.h"**.

Implemented in **"dlls/user32/message.c"**.

Debug channel **"msg"**.
