Reboot computer using API in Windows NT
Posted on 1997-06-13
I want to reboot the computer in Windows NT when a certain condition is met. I use the API function (ExitWindows) which works in Windows 95, but fails to work in Windows NT. This fuction is supposed to work in any Win-32 environment.
Private Declare Function ExitWindows Lib "User32" Alias "ExitWindowsEx" (ByVal dwOptions As Long, ByVal dwReserved As Long) As Long
If ... Then ExitWindows EWX_REBOOT, &HFFFFFFFF