WM_QUERYENDSESSION Windows session end causes

  • Thread starter Thread starter Viktor Kushnir
  • Start date Start date
V

Viktor Kushnir

Does anybody know how to determine what caused WM_QUERYENDSESSION Windows
session end message sent:

- system shutdown request;

- system reboot;

- system power off;

- reboot in MS DOS (on Win9X)?



It seems, WM_QUERYENDSESSION has only one parameter, which allows to
determine the case of the user log-off. Any way to get more information?



Thanks,



Viktor
 
I tried to find this out some weeks ago...no answer.
There is a registry key "ShutdownSetting" (see
HKCU/Software/Microsoft/Windows/CurrentVersion/Explorer), but it only tells
what the user last chose in the shutdown window, not necessarily what kind
of shutdown is actually in progress.
e.g. if a user last selected "Shutdown" some time ago, and an application
initiates a reboot (say, after an installation), you'll get "shutdown" from
the registry key.

Robert
 
Back
Top