WM_QUERYENDSESSION Windows session end causes

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
 
R

Robert

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top