WM_SYSTEMERROR
wErrSpec = wParam; /* specifies when error occurred */
The WM_SYSTEMERROR message is sent when the Windows kernel encounters an error but cannot display the system-error message box.
wErrSpec
Value of wParam. Specifies when the error occurred. Currently, the only valid value is 1, indicating that the error occurred when a task or library was terminating.
An application should return zero if it processes this message.
A shell application should process this message, displaying a message box that indicates an error has occurred.