Solved

Question on reboot and shutdown

Posted on 1998-12-02
4
234 Views
Last Modified: 2013-11-20
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!!!
0
Comment
Question by:justinng
  • 2
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
Bridge earned 20 total points
ID: 1325649
ExitWindowsEx
0
 

Author Comment

by:justinng
ID: 1325650
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
 
LVL 1

Expert Comment

by:Bridge
ID: 1325651
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
 

Author Comment

by:justinng
ID: 1325652
Thanks... I'm only interested in win9x anyway.... :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question