const EWX_LogOff as long=0
const EWX_SHUTDOWN as long=1
const EWX_REBOOT as long=2
const EWX_FORCE as long=4
Private Declare Function ExitWindow _
Lib "User32" Alias "ExitWindow Ex" _
(Byval dwOption as Long, Byval dwReserved as Long) as Long
Private Sub command1_Click( )
ExitWindow EWX_SHUTDOWN,&H FFFFFFFF
End Sub
Private Sub command2_Click( )
ExitWindow EWX_REBOOT ,&HFFFFFFFF
End Sub
ERROR:
there is run time error:
cannot find DLL entrypoint ExitWindowEx in User32
const EWX_SHUTDOWN as long=1
const EWX_REBOOT as long=2
const EWX_FORCE as long=4
Private Declare Function ExitWindow _
Lib "User32" Alias "ExitWindow Ex" _
(Byval dwOption as Long, Byval dwReserved as Long) as Long
Private Sub command1_Click( )
ExitWindow EWX_SHUTDOWN,&H FFFFFFFF
End Sub
Private Sub command2_Click( )
ExitWindow EWX_REBOOT ,&HFFFFFFFF
End Sub
ERROR:
there is run time error:
cannot find DLL entrypoint ExitWindowEx in User32
Comment