Hi,
IO'm trying to shutdown Windows. I use these:
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
x = ExitWindowsEx(EWX_SHUTDOWN, 0)
But when I use EWX_FORCE then I just logsoff(2000). When Shutdown is called nothing happens. What am I doing wrong?
Sand Hawk




Reply With Quote