You can't stop me, I'm a machine, jerk!
I hate to ask other developers their secrets but this one is awesome! Any chance you would be willing to share how you do this? Very handy trick to combat auto rebooting malware.
Sorry about the following Delphi:
private { Private declarations } procedure WMQueryEndSession(var Msg: TWMQueryEndSession); message WM_QueryEndSession; {...} procedure TForm1.WMQueryEndSession (var Msg : TWMQueryEndSession) ; begin if MessageBox(Form1.Handle,PChar('Windows is attempting to shut down. Allow the shutdown?'),PChar('Windows wants to shut down'),MB_YESNO) = mrYes then Msg.Result := 1 else Msg.Result := 0; end;
Dial-a-fix page on facebook!
I hate to ask other developers their secrets but this one is awesome! Any chance you would be willing to share how you do this? Very handy trick to combat auto rebooting malware.
Sorry about the following Delphi:
private { Private declarations } procedure WMQueryEndSession(var Msg: TWMQueryEndSession); message WM_QueryEndSession; {...} procedure TForm1.WMQueryEndSession (var Msg : TWMQueryEndSession) ; begin if MessageBox(Form1.Handle,PChar('Windows is attempting to shut down. Allow the shutdown?'),PChar('Windows wants to shut down'),MB_YESNO) = mrYes then Msg.Result := 1 else Msg.Result := 0; end;