How do I tell Windows to shutdown?
Is there an API funtion to make Windows shutdown? It''s for the big "Shutdown" button on my shell replacement. Thanks.
Take a look on MSDN for ExitWindowsEx. You'll likely want to use the flag EWX_SHUTDOWN (there are also flags for reboot, power off, log off, force application terminate)
[EDIT] Unclosed HREF was screwing up rest of page.
[edited by - michalson on May 2, 2002 8:27:00 AM]
[EDIT] Unclosed HREF was screwing up rest of page.
[edited by - michalson on May 2, 2002 8:27:00 AM]
Yeah, ExitWindowsEx() should do the trick.
The first argument can be either EWX_POWEROFF to shut down and power off or EWX_SHUTDOWN to shutdown to a state where it''s safe to switch the computer off. You can also use this routine to log users off and reboot the machine. Look up the documentation in MSDN...
The first argument can be either EWX_POWEROFF to shut down and power off or EWX_SHUTDOWN to shutdown to a state where it''s safe to switch the computer off. You can also use this routine to log users off and reboot the machine. Look up the documentation in MSDN...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement