VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Absolute Windows Shut Down

by Arjang (3 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 3.0
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (15 Votes)

When you use the ExitWindowsEx API to reboot the system under Windows NT and Windows 2000, the machine does not reboot.
'CAUSE
In order to programmatically reboot a Windows NT or Windows 2000 system, the process requires the SE_SHUTDOWN_NAME privilege. By default, Visual Basic applications do not have this privilege and therefore will not reboot the machine.
In order to get ExitWindowsEx API to reboot the system under Windows NT or Windows 2000, the SE_SHUTDOWN_NAME privilege must be set.
This Code Shows you the best way to reboot force restart or shut down a PC

Assumes
N/A
Side Effects
Be carefull It will restart the machine.
API Declarations
Private Declare Function ExitWindowsEx Lib "user32" (ByVal _
dwOptions As Long, ByVal dwReserved As Long) As Long

Rate Absolute Windows Shut Down

Download Absolute Windows Shut Down

Download Absolute Windows Shut Down (3 KB)

Absolute Windows Shut Down Comments

No comments have been posted about Absolute Windows Shut Down. Why not be the first to post a comment about Absolute Windows Shut Down.

Post your comment

Subject:
Message:
0/1000 characters