Solved

Question on reboot and shutdown

Posted on 1998-12-02
4
207 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expand macro to ask for filename column 8 36
tripleUp challenge 7 73
noX challenge 17 91
mapBully challenge 6 110
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

943 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now