I have handled WM_QUERYENDSESSION
in an MFC application to handle reboot requests, to block reboots during certain conditions.
Is it possible to get the source of the reboot from an MFC application?
I need to find the source of the reboot request, i.e whether the user requested the reboot using Windows options, or if any application triggered the reboot, or if a crash/blue screen caused the reboot.
I would appreciate any help.