?
Solved

Strong API for rebooting the system

Posted on 2004-05-02
6
Medium Priority
?
209 Views
Last Modified: 2013-11-20
Dear All,

I am developing  an security application in which my user mode exe (VC++ MFC Version 6.0, specifically for Windows 2000) acts as an user interface and file system filter driver driver handles the security part. Due to some problem in the driver, the sytem doesnot restarts properly on rebooting the system.  (start->shutdown->restart)

Is there any API provided that is strong enough to restart the sytem inspite of the driver being in the memory(i.e in such situation). so that I may call that API while restarting the system

Regards,
Rohit
0
Comment
Question by:rohitdivas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 23

Accepted Solution

by:
Roshan Davis earned 375 total points
ID: 10975508
Try this

ExitWindowsEx(EWX_REBOOT | EWX_FORCE, 0);

Rosh :)
0
 

Author Comment

by:rohitdivas
ID: 10975588
i tried but it didnot worked for my condition. are there are more shell level apis for this ????

actually my driver is not stopping and i am in search of temporary solution to restart the system force fullly
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 10975615
The ExitWindowsEx should close the system down.  How can your driver be in memory when the system is shutdown?

Are you saying the PC won't shutdown?  
Are you saying your driver isn't restarting when the system reboots?
0
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!

 

Author Comment

by:rohitdivas
ID: 10975657
I mean to say that my driver is in memory and due to some reason. When i try to restart the system , it shows the dialog box that system is going to shudown dialog (the normal , as we usually see in daily life while restarting/shudown the system)
and then the system just hangs there only. and i am debugging my driver remotely and see that driver is still running.

So I need to restart the system forcefully. Please comment.
0
 
LVL 3

Expert Comment

by:akalmani
ID: 10975685
A similar problem had been posted here. Do you check the previleges before shutdown ?

Check this out
http://www.experts-exchange.com/Programming/Programming_Languages/MFC/Q_20944865.html
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 11096500
Your original response to the comment you have accepted was the following

i tried but it didnot worked for my condition


Out of interest why is it now acceptable as a correct answer?
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month12 days, 2 hours left to enroll

752 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