Can someone take a look at this and give me an idea of what I might be doing incorrectly. I am trying to reboot windows from within a VB 6.0 app on a Windows NT 4.0 machine. When running it, I receive no error messages, but the machine does not seem to respond at all to the request.

===========================================================
Public Declare Function ExitWindowsEx Lib "user32" Alias "ExitWindowsEx" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long

Public Const EWX_REBOOT = 2
-----------------------------------------------------------

ExitWindowsEx EWX_REBOOT, 0
===========================================================

Thanks.

Jay D Zimmerman