Lloyd
Nov 11th, 1999, 01:32 AM
Hi out there! I am working on a program that will run at the end of the day and then shut down Windows NT when finished. I tried to use the code below to shut windows down but literly nothing happens. Does anyone have any ideas?
Thanks,
Lloyd
'General Declarations
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Private Const EXIT_LOGOFF = 0
Private Const EXIT_SHUTDOWN = 1
Private Const EXIT_REBOOT = 2
Public Sub ShutDown(ByVal uFlags As Long)
Call ExitWindowsEx(uFlags, 0)
End Sub
Private Sub cmdRun_Click()
Call ShutDown(1)
End Sub
Thanks,
Lloyd
'General Declarations
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Private Const EXIT_LOGOFF = 0
Private Const EXIT_SHUTDOWN = 1
Private Const EXIT_REBOOT = 2
Public Sub ShutDown(ByVal uFlags As Long)
Call ExitWindowsEx(uFlags, 0)
End Sub
Private Sub cmdRun_Click()
Call ShutDown(1)
End Sub