by Syed Danish Afzal Rizvi (13 Submissions)
Category: Windows API Call/Explanation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 20th August 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Restart, Shutdown and Logoff Windows
API Declarations
Private Const EWX_LOGOFF = 0
Private Const EWX_SHUTDOWN = 1
Private Const EWX_REBOOT = 2
if option(0).value = 1 then
ExitWindowsEx Ewx_logoff, 0&
elseif option(1).value = 1 then
ExitWindowsEx Ewx_Shutdown, 0&
elseif option(1).value = 1 then
ExitWindowsEx Ewx_Reboot, 0&
end if
End Sub