How can I create modul for shotdown (reboot,or logoff)for machine. I have XP profesional. On win98,or ME works good with this example:
Declare Function Shutdown Lib "user32" Alias "ExitWindowsEx" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Global Const EWX_LOGOFF = 0
Global Const EWX_SHUTDOWN = 1
Global Const EWX_REBOOT = 2
Global Const EWX_FORCE = 4
Function Stop()
dim I as long
I = Shutdown(EWX_SHUTDOWN, 1)
end function
Thanks
Declare Function Shutdown Lib "user32" Alias "ExitWindowsEx" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Global Const EWX_LOGOFF = 0
Global Const EWX_SHUTDOWN = 1
Global Const EWX_REBOOT = 2
Global Const EWX_FORCE = 4
Function Stop()
dim I as long
I = Shutdown(EWX_SHUTDOWN, 1)
end function
Thanks