🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

ExitWindowsEx

#9518
From: Brent
Date: Wed, 07 Jul 2004 02:07
14 lines
1131 bytes
Hi All,

ExitWindowsEx(EWX_SHUTDOWN, 0);

I want to use the above code to turn the computer off.  On XP, the program
will only shut down to the login screen.  How do I ensure that the program
has the SE_SHUTDOWN_NAME privilege set?  Is it something I can do within the
application.

Any help greatly appreciated.

thanks,

Brent
Technical Details
Message-ID: <40eb5ae2$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,877cf1e5dc319316,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Brent" <nospam@nospam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: ExitWindowsEx
Date: Wed, 7 Jul 2004 12:07:31 +1000
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 203.10.46.175
Message-ID: <40eb5ae2$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1089166050 203.10.46.175 (6 Jul 2004 19:07:30 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail