Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Intercept windows restart
#4
Create a dialog or window or hooked toolbar that runs all the time. In the dialog/window procedure, add case WM_QUERYENDSESSION. Read in the MSDN Library how to prevent shutdown. Or you can then autosave etc and then allow to shut down.

Or use the trigger. It does not allow to cancel shutdown, but gives some time to save etc. In either case, you will not know if restarting.

Vista has new function

dll user32 CancelShutdown

Did not try it.

See also AbortSystemShutdown. Not sure if it works in all cases.


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)