Here is a API call for your task to perform.<br><br>Use the function ExitWindowsEx. This function has two parameters. The first is one or more flags to instruct windows how to shutdown. These are listed below along with the declarations. The second part of the function is reserved, and it set to zero. It is important to unload your application to help the system to shut down smoothly. The declarations for this function are below.<br>Public Const EWX_LOGOFF = 0 <br>Public Const EWX_SHUTDOWN = 1 <br>Public Const EWX_REBOOT = 2 <br>Public Const EWX_FORCE = 4 <br>Declare Function ExitWindowsEx Lib "user32" Alias _<br>"ExitWindowsEx" (ByVal uFlags As Long, ByVal dwReserved _<br>As Long) As Long <br>If you wanted to forcefully reboot the computer use the following code:<br><br>t& = ExitWindowsEx(EWX_FORCE OR EWX_REBOOT, 0)<br><br>I hope this you required if I am not wrong.
I think that would serve his purpose, but which of those constant combinations would give the Quick Restart (restart windows without rebooting the computer itself) the behavior he described? <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href=
</a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.