定义:
Private Declare Function ExitWindowsEx Lib "user32" Alias "ExitWindowsEx" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
运用方法:
CALL ExitWindowsEx(EWX_LOGOFF,0)
EWX_LOGOFF=0 时,注消用户重新登陆
EWX_LOGOFF=1时,退出WINDOWS并关机
EWX_LOGOFF=2时,退出WINDOWS,并重新登陆WINDOWS
EWX_LOGOFF=4时,强制关机.
可能你是用了缺省的0值.