DefWinProc() should call PostQuitMessage() on WM_ENDSESSION if the shutdown is proceeding.
Attach a file by drag & drop or click to upload