Solved

Strong API for rebooting the system

Posted on 2004-05-02
6
208 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 125 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
Independent Software Vendors: 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

Independent Software Vendors: 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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

690 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