🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3325

Re: shutdown computer

#3325
From: Renan
Date: Fri, 21 Jul 2006 12:57
21 lines
1436 bytes
That should do the job. I will try it. 

Thanks

Renan

>bool ExitWindowsEx(UINT uFlag, DWORD dwReason);
>
>the flags for shutting down would be either EWX_SHUTDOWN or EWX_POWEROFF. 
>If your code is going to be run on Win2k+ machines as well then you may need 
>to adjust the privileges as well.  This is try of InitiateSystemShutdown / 
>Ex so i assume it must be true with this api.
>
>See 
>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shutdown/base/how_to_shut_down_the_system.asp 
>for more info...
>
>HTH
>
>Mike C
Technical Details
Message-ID: <44c0cf53$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44c0bfe7$1@newsgroups.borland.com> <44c0c3d1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,1a7de0d7fbb609c8
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Renan" <gulbrrs@gmail.com>
Sender: "Renan" <gulbrrs@gmail.com>
Reply-To: "Renan" <gulbrrs@gmail.com>
Subject: Re: shutdown computer
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 200.182.147.10     
X-Forwarded-For: 192.168.0.138
References: <44c0bfe7$1@newsgroups.borland.com> <44c0c3d1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <44c0cf53$1@newsgroups.borland.com>
Date: 21 Jul 2006 05:57:55 -0700
X-Trace: newsgroups.borland.com 1153486675 207.105.83.66 (21 Jul 2006 05:57:55 -0700)
Lines: 23
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail