- Original Message -
From: "Cortex" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 15, 2002 6:23 PM
Subject: Re: [hlcoders] little app
> Yes... My original question is "How to make a program which shuts down the
> computer afte
At 03:00 PM 15/04/2002 +, you wrote:
>Commando wrote:
>>This should work on all systems;
>
>No It SHOULDNT work on ANY system. There may be systems on which it
>DOES, but that is a Bad Thing.
It will work on any Windows system (except maybe 95), but the original
question was limited to Window
Sent: Monday, April 15, 2002 5:00 PM
Subject: Re: [hlcoders] little app
Commando wrote:
> This should work on all systems;
No It SHOULDNT work on ANY system. There may be systems on which it
DOES, but that is a Bad Thing.
> // Shut down the system and force all applications to close.
>
> Applications sould NEVER shut down the system itself. It should not be a
> matter of courtesy, they souldn't be allowed.
Try this out with applications that have unsaved data. They will pop up a
dialog box when Windows REQUESTS (not demands) that they shut down indicating
that something has no
- Original Message -
From: "Ralph Hartley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 15, 2002 4:00 PM
Subject: Re: [hlcoders] little app
> Commando wrote:
> > This should work on all systems;
>
> No It SHOULDNT work on ANY sys
--
[ Picked text/plain from multipart/alternative ]
um i think they just want their computer to shut down after it compiles a level so it
doesn't stay on all night, dude. Is it really that offensive an idea? ;) I'm fairly
sure that the user in this case is not going to put this program on a
mass
Commando wrote:
> This should work on all systems;
No It SHOULDNT work on ANY system. There may be systems on which it
DOES, but that is a Bad Thing.
> // Shut down the system and force all applications to close.
> ExitWindowsEx(EWX_POWEROFF, 0);
Applications sould NEVER shut down the system it
thx :)
- Original Message -
From: Commando
To: [EMAIL PROTECTED]
Sent: Monday, April 15, 2002 12:13 AM
Subject: Re: [hlcoders] little app
Sorry, I cut and pasted that out of some code in my personal shared
library, but missed one line. The declaration of hToken is;
HANDLE hToken
do
> To: [EMAIL PROTECTED]
> Sent: Saturday, April 13, 2002 2:26 PM
> Subject: Re: [hlcoders] little app
>
>
> This should work on all systems;
>
> // Get a token for this process.
> if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES |
>
> you can just call rundll32.exe with the api call when you are done
I guess you mean something like this...
http://www.techtv.com/callforhelp/answerstips/story/0,24330,2330147,00.html
Jeffrey "botman" Broome
___
To unsubscribe, edit your list prefe
you can just call rundll32.exe with the api call when you are done
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Cortex
Sent: Sunday, April 14, 2002 12:00 PM
To: [EMAIL PROTECTED]
Subject: Re: [hlcoders] little app
Thx a lot Botman :)
It works great
ps it could interest some of
you...)
Voili :)
- Cortex : mapper & coder www.hlalbator.fr.st
- Original Message -
From: botman
To: [EMAIL PROTECTED]
Sent: Sunday, April 14, 2002 5:09 PM
Subject: Re: [hlcoders] little app
> I've tried your 2 solutions. The one which is t
> I've tried your 2 solutions. The one which is the more appopriate in my
case is
> the one from you, Commando (I like the EWX_POWEROFF flag :) ) !
>
> The only trouble I ran into is that I don't know what should hToken be...
I took
> a look at MSDN... Now, I declare it as PHANDLE, but it must be
nal Message -
From: Commando
To: [EMAIL PROTECTED]
Sent: Saturday, April 13, 2002 2:26 PM
Subject: Re: [hlcoders] little app
This should work on all systems;
// Get a token for this process.
if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES
ous indeed...
-Lakario
- Original Message -
From: Neale Roberts
Sent: Saturday, April 13, 2002 6:22 AM
To: [EMAIL PROTECTED]
Subject: Re: [hlcoders] little app
As far as I'm aware, it wasn't actually used for anything.
- Original Message -
From: "Tom" <[EMAIL PROTECT
This should work on all systems;
// Get a token for this process.
if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES |
TOKEN_QUERY, &hToken))
{
TOKEN_PRIVILEGES tkp;
// Get the LUID for the shutdown privilege.
LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME,
> Now comes the real code question :D I found a way to get around this without
a
> new version... The principle is to make a little Console Application which
could
> be run after the compil tools (in the Run window) and which shuts down the
PC.
> But I don't know how to shut down a PC in C++... Do
why dont they remove the button then?
- Original Message -
From: "Neale Roberts" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, April 13, 2002 11:18 AM
Subject: Re: [hlcoders] little app
> As far as I'm aware, it wasn't actually us
As far as I'm aware, it wasn't actually used for anything.
- Original Message -
From: "Tom" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, April 13, 2002 10:04 AM
Subject: Re: [hlcoders] little app
> i have a question, wtf is the path
i have a question, wtf is the path tool for? Ive tried using it and it
doesnt seem to do much and there are no tutorials on how to use
it...
- Original Message -
From: "Cortex" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, April 13, 2002 8:52 AM
Subject: [hlcoders]
20 matches
Mail list logo