Article View: borland.public.cppbuilder.nativeapi
Article #13485Re: Windows Shutdown Event
From: Remy Lebeau (TeamB)
Date: Fri, 10 Oct 2003 17:25
Date: Fri, 10 Oct 2003 17:25
21 lines
1785 bytes
1785 bytes
"Andy Stites" <a.stites@avatar-group.com> wrote in message news:3f86c666@newsgroups.borland.com... > On a windows (XP) shutdown event how do you > distingusih a shutdown from a reboot or a logoff. Like all of the other Windows OSs, the WM_QUERYENDSESSION and WM_ENDSESSION messages specify that. The lParam will contain ENDSESSION_LOGOFF if it is a logoff, otherwise it is a shutdown/reboot instead. > I need to catch it and stop it, and then redo the event, but I > can't tell if a shutdown or reboot was sent. Those you cannot distinquish between, because the OS itself treats them the same way, because either way the OS itself has to be shut down. The only difference between them is that a reboot sends one signal to the hardware to restart the bootup process while the other sendsa different signal to shut off the power instead. Gambit
Technical Details
Message-ID:
<3f86eb2a$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f86c666@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,90b532724b1730a0 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-10-10 10:39:54 PST From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f86c666@newsgroups.borland.com> Subject: Re: Windows Shutdown Event Date: Fri, 10 Oct 2003 10:25:48 -0700 Lines: 23 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 67.22.137.75 Message-ID: <3f86eb2a$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1065806634 67.22.137.75 (10 Oct 2003 10:23:54 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail