Reboot NT4 WS with VBA 
Author Message
 Reboot NT4 WS with VBA

Hi Oliver,

Pass the function fTerminateWin one of the declared constants.

CAUTION: This function returns immediately and the shutdown proceeds in the
background. Be sure to terminate your own application to help the shutdown
proceed smoothly.

'**************** Code Begin *******************
Private Declare Function apiExitWindowsEx Lib "user32" _
        Alias "ExitWindowsEx" _
        (ByVal uFlags As Long, ByVal dwReserved As Long) _
        As Long

Public Const EWX_FORCE = 4      'Forcibly terminates processes
                                'that do not respond.
Public Const EWX_LOGOFF = 0     'Terminates processes, then logs off.
Public Const EWX_SHUTDOWN = 1   'Powers the system off, if possible.
Public Const EWX_REBOOT = 2     'Reboots the system.

Function fTerminateWin(lngExitVal As Long)
    fTerminateWin = apiExitWindowsEx(lngExitVal, 0)
End Function
'***************** Code End  *******************

HTH
--
Dev Ashish (Just my $.001)
---------------
The Access Web ( http://www.*-*-*.com/ ~dashish )
---------------

:Hi everybody,
:
:howe I can reboot a Win NT v4.0 Workstation with Visual Basic for
:Access ?
:

:Bye,
:Igor.
:
:+-------------------------------------------+
:| I-Lab Productions:      Oliver Stephan    |
:| .Internet Services     Am Vogelbusch 5a   |
:| .Datenbankloesungen    26203 Wardenburg   |
:| .Hardware-Vertrieb     http://www.*-*-*.com/ |
:+-------------------------------------------+



Wed, 17 Jan 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Error running under NT4 WS

2. dir$ prob returning dir from NT4 share to 95 ws

3. Help: VB5EE NT4 WS Threed32 license functionality

4. RegConnectRegistry use in VB 4.0/NT4.0 WS

5. Personal WS vs Peer WS

6. Remote Reboot of NT4 workstation

7. a DLL component to reboot NT4?

8. win98/NT4 reboot on activeX install:

9. win98/NT4 reboot on activeX install:

10. win98/NT4 reboot on activeX install

11. REBOOT NT4 using ExitWindowEx and VB4??

12. Reboot an NT4 Server

 

 
Powered by phpBB® Forum Software