doc/ConsoleCtrlEvent.md
conhost requests that user32 injects a thread into the attached console application.
See ntuser's exitwin.c for CreateCtrlThread.
Sourced from ntuser's exitwin.c, user.h
| Event | Circumstances | Timeout |
|---|---|---|
CTRL_CLOSE_EVENT | any | system parameter SPI_GETHUNGAPPTIMEOUT, 5000ms |
CTRL_LOGOFF_EVENT | CONSOLE_QUICK_RESOLVE_FLAG[1] | registry key CriticalAppShutdownTimeout or 500ms |
CTRL_LOGOFF_EVENT | none of the above | system parameter SPI_GETWAITTOKILLTIMEOUT, 5000ms |
CTRL_SHUTDOWN_EVENT | service process | system parameter SPI_GETWAITTOKILLSERVICETIMEOUT, 20000ms |
CTRL_SHUTDOWN_EVENT | CONSOLE_QUICK_RESOLVE_FLAG[1] | registry key CriticalAppShutdownTimeout or 500ms |
CTRL_SHUTDOWN_EVENT | none of the above | system parameter SPI_GETWAITTOKILLTIMEOUT, 5000ms |
CTRL_C, CTRL_BREAK | any | no timeout |
[1]: nobody sets CONSOLE_QUICK_RESOLVE_FLAG.