Hi, when I call this function like this:on windows xp it only goes back to the logon screen. How do I make it completely shut down the computer?Code:ExitWindowsEx(EWX_FORCE, 0);
Thanks
Hi, when I call this function like this:on windows xp it only goes back to the logon screen. How do I make it completely shut down the computer?Code:ExitWindowsEx(EWX_FORCE, 0);
Thanks
this suggests that maybe the call should look like
although they suggest strongly you feed a reason instead of using 0 for the second paramCode:ExitWindowsEx (EWX_FORCE | EWX_SHUTDOWN, 0);
hello, internet!
lol thanks. maybe i should start reading more about the stuff
hey moi, what are those in your signature ??
"GM/GMU d- s+:-- a--- C++ UL>+ P-- L+>++ !E W+ N-- o+ K- w++>+++ O---- M-- V? PS++ PE+++ Y PGP->-- t+ 5 X+ !R tv-- b DI+ D+++>+++++ G e->++++ h! r-> y--"
No, fraid it's more complex than this. In XP you need (as the Remarks section in the MSDN article indicates) the correct level of priviledge. It's pretty complex, I spent most of a day researching MSDN and writing a chunk of code just to shut down XP. It ended up being a pageful which I'm definitely going to stick in a LIB sometime when I can be bothered!
I can email it if you wish, I don't think it will be readable if I post it here.
My email is [email protected] if you want to ask for a copy...dunno if the moderator lets us post email addresses!!
Cheers,
Chris.