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 now :) I've taken the code from the adress you've given (and
I've added a flag : EWX_POWEROFF) :) I should take a look more often at the
MSDN site !

I've published the shutdown.exe file to :
http://www.hlalbator.fr.st/shutdown.exe (perhaps 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 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 an other
thing to
> do like : "hToken = ...();".

hToken is a HANDLE;

OpenProcessToken() returns the token.

Here's the complete source code example...

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/shu
tdown_7z8u.asp

Jeffrey "botman" Broome

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to