petershaw9
asked on
How to shut down computer
I am using win 98. In my program, I want to have a shutting down computer function. I try to use ExitWindowsEx(EWX_POWEROFF , 0). But it only does log off in win 98, win me and do nothing in win 2000.
So how can the program shut down a computer?
Thank u
Peter
So how can the program shut down a computer?
Thank u
Peter
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
'Shutdown PC with all Windows versions' article at http://www.delphi3000.com/article.asp?ID=2108
Here's an article I wrote about this very same issue:
http://www.bhnet.com.br/~simonet/tipstricks/exitwindowsnt.htm
Yours,
Alex
http://www.bhnet.com.br/~simonet/tipstricks/exitwindowsnt.htm
Yours,
Alex
Use EWX_SHUTDOWN instead. Or (EWX_FORCE or EWX_SHUTDOWN,0) to close all apps immediately.
Regards, Geo