Question on reboot and shutdown

Hi there,
         Which MFC programming function can i use to perform reboot and shutdown operation of a pc? I'm using MSVC 6.0 to write programs.

Any help offered is very much appreciated!!!
justinngAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
BridgeConnect With a Mentor Commented:
ExitWindowsEx
0
 
justinngAuthor Commented:
can u pls elaborate a little more abt it? what are the parameters which are passed to it? That function is for reboot only... what abt shutdown?
0
 
BridgeCommented:
Look at the help.
The function works for both using EWX_LOGOFF and EWX_REBOOT as parameters.
Windows 9x should be fine but if your running under NT then you will have to adjust the user privialages to do these operations.

And that my friend is another question.
0
 
justinngAuthor Commented:
Thanks... I'm only interested in win9x anyway.... :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.