• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 214
  • Last Modified:

Strong API for rebooting the system

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
rohitdivas
Asked:
rohitdivas
1 Solution
 
Roshan DavisCommented:
Try this

ExitWindowsEx(EWX_REBOOT | EWX_FORCE, 0);

Rosh :)
0
 
rohitdivasAuthor Commented:
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
 
AndyAinscowFreelance programmer / ConsultantCommented:
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
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
rohitdivasAuthor Commented:
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
 
akalmaniCommented:
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
 
AndyAinscowFreelance programmer / ConsultantCommented:
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

Tackle projects and never again get stuck behind a technical roadblock.
Join Now