Note that there are some explanatory texts on larger screens.

plurals
  1. POKilling window application from Task Manager sends WM_QUIT?
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COWindows message pumps exit differently depending on how they're coded, but the most common main-thread pump uses `GetMessage()` with *no window handle*. When your application window receives a WM_CLOSE it invokes `DestroyWindow()`, which eventually sends a WM_DESTROY for said-same window. That, in turn, usually posts a *application level* WM_QUIT by invoking `PostQuitMessage(retval)`. This is what eventually posts WM_QUIT to the main message loop, which causes `GetMessage()` to return FALSE, and thereby exists the `while (GetMessage(...)` loop and your application afterward.
      singulars
    2. COWhen you kill the process from Task Manager, it is first sent a polite request to quit (WM_QUIT). If it doesn't respond in a timely manner, it's just forcibly terminated. I used an example somewhere else with the example of having a large sinkhole open right below your feet; you're simply gone, and you don't get a chance to call home and say goodbye to your spouse or significant other first. Forceful termination doesn't allow tidy cleanup; it's a **forceful termination**, and you've missed your chance.
      singulars
    3. CO@KenWhite: `WM_QUIT` isn't a request to quit, it's a message that an app posts to itself to break out of the message loop. I'd expect Task Manager to simply send `WM_CLOSE` in the first instance.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload