I'm trying to shutdown windows 2000 from my vb application, but It doesn't seems to be working!
I'm using the ExitWindowsEx API:

Option Explicit

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

Public Const ewx_shutdown = 1
Public Const ewx_restart = 2
Public Const ewx_logoff = 4

Private Sub Command1_Click()
Call ExitWindowsEx(ewx_shutdown,1)
End Sub

This doesn't work, but when I try to logoff, it is working fine!!!