Title: RE: Detect and prevent shutdown/restart

typically regular users shoudl not be allowed to shut down machines, kicking them out of local admin or power users will do it.

otherwise you may want to check out API SetConsoleCtrlHandler() and its sample in MSDN.

-Bill
-----Original Message-----
From: Nick Zambo [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 10, 2004 8:33 PM
To: [EMAIL PROTECTED]
Subject: Detect and prevent shutdown/restart


Hi all,

I think that this is the list to which my question belongs. 

I have an gui win32 app that does some possibly long file transfers.
Of course, my users are horribly impatient and even though the screen
reads "Please Wait" and there is even a nifty little moving progress
bar, they still have a tendancy to shutdown or restart in the middle
of the progress.

Now, I know how to catch windows shutdown/restart in VB, but I've
scoured the net and can't find the API or the hook to detect and
prevent windows shutdown with perl.  I know that the
"AbortSystemShutdown" call will stop windows from shutting down.

So the short question is, what do I need to do to catch WM_ENDSESSION
or whatever it is?

Thanks all.
Nick
[EMAIL PROTECTED]
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to