Archived

This topic is now archived and is closed to further replies.

Oranda

How do I tell Windows to shutdown?

Recommended Posts

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]

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites