Ver Mensaje Individual
  #10  
Antiguo 20-11-2014
Avatar de escafandra
[escafandra] escafandra is offline
Miembro Premium
 
Registrado: nov 2007
Posts: 2.197
Reputación: 20
escafandra Tiene un aura espectacularescafandra Tiene un aura espectacular
Un detalle más, cuando termine el proceso debemos cerrar los Handles:
Código Delphi [-]
CloseHandle(infoProceso.hProcess);
CloseHandle(infoProceso.hThread);
Cita:
Empezado por msdn
msdn
If the function succeeds, be sure to call the CloseHandle function to close the hProcess and hThread handles when you are finished with them. Otherwise, when the child process exits, the system cannot clean up the process structures for the child process because the parent process still has open handles to the child process. However, the system will close these handles when the parent process terminates, so the structures related to the child process object would be cleaned up at this point.

Saludos.
Responder Con Cita