Jump to content
  • Advertisement
Sign in to follow this  
leonheart

similar thread

This topic is 4901 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

this is a simalar thread to one of my last ones im using Dev C++ and i want to know how to write program to shutdown my computer any one know the source code

Share this post


Link to post
Share on other sites
Advertisement
yeh all i can find is DOS commands and there lame i want something for C++ but cant find anything i need help

Share this post


Link to post
Share on other sites
I assume you're after a function that shuts down Windows and lets you turn off the computer. Try looking into ExitWindowsEx. It can perform the usual windows shutdown routines.

Regards

Share this post


Link to post
Share on other sites
no sorry staaf good source of info just not what im looking for if any one out there has a sorce code to shutdown or logoff computers please post it here

thanx

Share this post


Link to post
Share on other sites
I'm going to go out on a limb here and assume there is no standard way to do that and therefore you have to use some system command ala DOS or that ExitWindowsEX() thing.

Out of curiosity why do you want to shut down the computer? If you're using windows you can't just shut the thing down when the person could be in the middle of something. And if it's DOS the person can just do it themselves... I just can't see any legitimate use for doing that.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by nobodynews
I'm going to go out on a limb here and assume there is no standard way to do that and therefore you have to use some system command ala DOS or that ExitWindowsEX() thing.

Out of curiosity why do you want to shut down the computer? If you're using windows you can't just shut the thing down when the person could be in the middle of something. And if it's DOS the person can just do it themselves... I just can't see any legitimate use for doing that.



It would be useful if you wrote your own shell. Or simply if you wrote an application whose task is very long (raytracing, video encoding, ...). Having a "turn off computer when done" option is nice.


Hope this helps.

Share this post


Link to post
Share on other sites
Read the provided links - people aren't here to do your coding for you, you could have located that information yourself in under a minute using Google. ExitWindowsEx is exactly what you're after unless you're using an OS other than Windows (in which case you'll need to tell us which one).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!