Solved

Strong API for rebooting the system

Posted on 2004-05-02
6
206 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
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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Get filename and folder into excel 7 79
sameEnds challenge 3 180
Line meaning 9 88
Remove Password Protection from pdf (with password) using an command line executable 5 63
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…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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…

828 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