Solved

Strong API for rebooting the system

Posted on 2004-05-02
6
203 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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

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

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

706 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

15 Experts available now in Live!

Get 1:1 Help Now