Attribute VB_Name = "Module2"
Public Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Public Const EWX_FORCE = 4
Public Const EWX_LOGOFF = 0
Public Const EWX_REBOOT = 2
Public Const EWX_SHUTDOWN = 1
Public Sub Win_Reboot()
ExitWindowsEx EWX_REBOOT, 0
End Sub
Public Sub Win_ForceShutdown()
ExitWindowsEx EWX_FORCE, 0
End Sub
Public Sub Win_Shutdown()
ExitWindowsEx EWX_SHUTDOWN, 0
End Sub
