Article View: borland.public.cppbuilder.nativeapi
Article #15289Re: Rebooting the Machine, part 2
From: Bob Gonder
Date: Tue, 15 Jul 2003 16:45
Date: Tue, 15 Jul 2003 16:45
23 lines
1847 bytes
1847 bytes
"James A Beggs" <jbeggs@aqha.org> wrote: >I'm trying to reboot the machine, where it powers down and back up, >completely from scratch. > >I've been using ExitWindowsEx(EWX_REBOOT | EXWFORCE, 0); > >However, I noticed that, at least on my laptop, this did nothing. So, I See Hugo's reply. >rewrote it as: >if (!ExitWindowsEx(EWX_REBOOT | EXWFORCE, 0)) > ExitWindowsEx(EWX_REBOOT & EWXFORCE, 0); > >The & worked, sort of, on my laptop. It logged me out of windows. And >exiting windows is fine, I guess, but I actually need a full reboot. How >would I do that instead? Well, yeah, reboot(2) & force(4) == logoff(0) The docs also say EWX_FORCE is a nasty thing to do. The header shows an EWX_FORCEIFHUNG that sounds nicer.
Technical Details
Message-ID:
<uib8hvshroevuvo372amlsdfcrg1hkhprb@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!newsfeed.news2me.com!elnk-nf2-pas!elnk-atl-nf1!newsfeed.earthlink.net!in.100proofnews.com!in.100proofnews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3f142280$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,27d0bd8ec98fa3f5 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-07-15 10:06:17 PST From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Rebooting the Machine, part 2 Date: Tue, 15 Jul 2003 09:45:21 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <uib8hvshroevuvo372amlsdfcrg1hkhprb@4ax.com> References: <3f142280$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.91/32.564 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.31.166.109 X-Trace: newsgroups.borland.com 1058287517 67.31.166.109 (15 Jul 2003 09:45:17 -0700) Lines: 25 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!newsfeed.news2me.com!elnk-nf2-pas!elnk-atl-nf1!newsfeed.earthlink.net!in.100proofnews.com!in.100proofnews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail