How to: distinguish ShutDown Message from Restart Message
From: Wang Qing (WangQing_at_discussions.microsoft.com)
Date: 08/31/04
- Next message: Eric: "Re: CDO and Virtual SMTP server"
- Previous message: Jeff Galbraith: "Re: Restricting count of messages returned in ExMAPI/C++"
- Next in thread: Eric: "Re: How to: distinguish ShutDown Message from Restart Message"
- Reply: Eric: "Re: How to: distinguish ShutDown Message from Restart Message"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 30 Aug 2004 22:41:05 -0700
I meet a problem. I use Windows API ExitWindowEx to exit windows XP. Then the
Windows XP will send WM_QUERYENDSESSION and WM_ENDSESSION to all
applications. But I write a program (application) to detect whether the XP
wants to shutdown the system or restart the system. How can my application
distinguish them through Windows Message?
And the same problem exists suspending the system and hibernating the system.
The second problem is I can use API WTSRegisterSessionNotification and then
wait for WM_WTSSESSION_CHANGE (WTS_SESSION_LOGON) to know whether a user is
logging in. But does there exist a method to detect a user wants to log in,
so I can deny its logging in?
If I use WTS_SESSION_LOGON, in fact it has logged in. So, I need a Windows
Message to know the logging in before it logged in.
Welcome any advice. Thanks.
-- --wang qing
- Next message: Eric: "Re: CDO and Virtual SMTP server"
- Previous message: Jeff Galbraith: "Re: Restricting count of messages returned in ExMAPI/C++"
- Next in thread: Eric: "Re: How to: distinguish ShutDown Message from Restart Message"
- Reply: Eric: "Re: How to: distinguish ShutDown Message from Restart Message"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|