Visual Basic - Shell,Termino de ejecucion

Life is soft - evento anual de software empresarial
 
Vista:

Shell,Termino de ejecucion

Publicado por claudio (7 intervenciones) el 28/07/2003 02:18:03
Como puedo saber cuando termina de ejecutarse una rutina bat desde un shell para pasar a la siguiente instruccion. Si alguien tiene alguna idea o metodo para solicionar este falencia del shell, me avisa...
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

RE:Shell,Termino de ejecucion

Publicado por Cecilia Colalongo (3116 intervenciones) el 28/07/2003 12:28:40
Fijate con esto:

Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long

Private Declare Function GetExitCodeProcess Lib "kernel32" (ByVal hProcess As Long, lpExitCode As Long) As Long

Const STILL_ACTIVE = &H103
Const PROCESS_QUERY_INFORMATION = &H400

Dim hProcess As Long
Dim RetVal As Long
hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, False, Shell("MiComando", vbMinimizedNoFocus))

Do
GetExitCodeProcess hProcess, RetVal
DoEvents
' Sleep 100
Loop While RetVal = STILL_ACTIVE
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