Visual Basic - SOCORRO!!!!!!!!!!

Life is soft - evento anual de software empresarial
 
Vista:

SOCORRO!!!!!!!!!!

Publicado por Andrea (8 intervenciones) el 22/04/2001 23:59:20
necesito saber cual es la instruccion o llamada API que tengo que hacer para el autoshutdown de un servidor que esta en WinNT, la instruccion que yo uso es:
Shell ("C:\WINDOWS\rundll32.exe shell32.dll,SHExitWindowsEx 0x1")
que funciona en Win 98 pero no en NT
por les pido ayuda!!!!!
gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

EXIT WINDOWS

Publicado por BENJO (167 intervenciones) el 03/05/2001 15:24:29
' Intentá con este código y fijate si la declaración es correcta para NT

Const EWX_LOGOFF = 0
Const EWX_SHUTDOWN = 1
Const EWX_REBOOT = 2
Const EWX_FORCE = 4
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Private Sub Form_Load()
'KPD-Team 1998
'URL: http://www.allapi.net/
'E-Mail: [email protected]
msg = MsgBox("This program is going to reboot your computer. Press OK to continue or Cancel to stop.", vbCritical + vbOKCancel + 256, App.Title)
If msg = vbCancel Then End
'reboot the computer
ret& = ExitWindowsEx(EWX_FORCE Or EWX_REBOOT, 0)
End Sub
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar