Solved

Question on reboot and shutdown

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
repeatSeparator  java  challenge 13 56
dog bark java program 15 81
canBalance challenge 34 65
SQUD PROXY SERVER, UNIX, SLL/HTTPS 5 45
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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…
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 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

13 Experts available now in Live!

Get 1:1 Help Now