Jump to content
  • Advertisement

Archived

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

Oranda

How do I tell Windows to shutdown?

This topic is 5865 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there an API funtion to make Windows shutdown? It''s for the big "Shutdown" button on my shell replacement. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
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
Thankies! This place sure has grown since I was here last. Half-hour turn-around times for replies is sweet!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!