Detecting windows shutdown.
Posted on 2002-07-26
I need a bit of help. I've got an application which I have password protected to prevent it from being closed. However, if the user whats to do a Windows shutdown, the app asks for a password still. I would like a way of being able to detect when Windows is shutting down/restarting and override the CloseQuery (CanClose) for the main form.
I've experimented with Procedure WMEndSession(var Msg : TWMEndSession); message WM_ENDSESSION, but it was never triggered.
Any help at all would be greatfully accepted :P