Re: [hlcoders] little app

2002-04-15 Thread Da:Sourcerer
- 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

Re: [hlcoders] little app

2002-04-15 Thread Commando
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

Re: [hlcoders] little app

2002-04-15 Thread Cortex
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. >

Re: [hlcoders] little app

2002-04-15 Thread botman
> 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

Re: [hlcoders] little app

2002-04-15 Thread _Phantom_
- 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

Re: [hlcoders] little app

2002-04-15 Thread Adam Saltsman
-- [ 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

Re: [hlcoders] little app

2002-04-15 Thread Ralph Hartley
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

Re: [hlcoders] little app

2002-04-15 Thread Cortex
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

Re: [hlcoders] little app

2002-04-14 Thread Commando
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 | >

Re: [hlcoders] little app

2002-04-14 Thread botman
> 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

RE: [hlcoders] little app

2002-04-14 Thread Kuja
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

Re: [hlcoders] little app

2002-04-14 Thread Cortex
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

Re: [hlcoders] little app

2002-04-14 Thread botman
> 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

Re: [hlcoders] little app

2002-04-14 Thread Cortex
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

Re: [hlcoders] little app

2002-04-13 Thread Nathan Taylor
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

Re: [hlcoders] little app

2002-04-13 Thread Commando
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,

Re: [hlcoders] little app

2002-04-13 Thread botman
> 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

Re: [hlcoders] little app

2002-04-13 Thread Tom
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

Re: [hlcoders] little app

2002-04-13 Thread Neale Roberts
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

Re: [hlcoders] little app

2002-04-13 Thread Tom
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]