Hi all, I try to shut down computer for security module developemnt. I used the following code, But its doesnt work also no error message come, Could you please clarify whicj way I can proceed? Thx a lot.
Const EWX_LogOff As Long = 0
Const EWX_SHUTDOWN = 1
Const EWX_REBOOT = 2
Const EWX_FORCE = 4
Private Declare Function ExitWindows _
Lib "User32" Alias "ExitWindow sEx" _
(ByVal dwOptions As Long, ByVal dwReserved As Long) As Long
Private Sub CommandButton3_ Click()
'Shut down windows
ExitWindows EWX_SHUTDOWN, &HFFFFFFFF
End Sub
Const EWX_LogOff As Long = 0
Const EWX_SHUTDOWN = 1
Const EWX_REBOOT = 2
Const EWX_FORCE = 4
Private Declare Function ExitWindows _
Lib "User32" Alias "ExitWindow sEx" _
(ByVal dwOptions As Long, ByVal dwReserved As Long) As Long
Private Sub CommandButton3_ Click()
'Shut down windows
ExitWindows EWX_SHUTDOWN, &HFFFFFFFF
End Sub
Comment