I've got a backup application that runs at shutdown. The program receives the WM_ENDSESSION message and stops it, therefore stopping the shutdown. Then, the program does the backups it needs to do and starts a shutdown again.
The problem I have is that the shutdown that the backup program starts is always a shutdown. I want to detect the type of shutdown that it's stopping so that I can do the same thing after the backup procedure. In a nutshell, if I do a shutdown, it's great, but if I do a restart or logoff, it shuts down after the backup.
I need to know how to capture the shutdown type during WM_ENDSESSION.
Thanks in advance,