WM_QUERYENDSESSION

This message is sent when the user chooses the End Session command. If any application returns zero, the session is not ended. Windows stops sending WM_QUERYENDSESSION messages as soon as one application returns zero, and sends WM_ENDSESSION messages, with the wParam parameter set to zero, to any applications that have already returned nonzero.

Parameters

wParam

This parameter is not used.

lParam

This parameter is not used.

Return Value

The return value is nonzero if the application can be conveniently shut down. Otherwise, it is zero.

Default Action

The DefWindowProc function returns nonzero.