Autor Beitrag
Gewuerzgurke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 152

Win XP
Lazarus
BeitragVerfasst: So 21.06.09 18:39 
Hallo, vermutlich ist die Lösung für mein Problem ganz einfach, nur ich find' sie nicht. Ich habe von ShellExecuteEx --> hProcess das Handle des gestarteten Prozesses. Wie kann ich am einfachsten überprüfen, ob dieser Prozess noch ausgeführt wird?


Moderiert von user profile iconGausi: Topic aus Linux API verschoben am So 21.06.2009 um 18:48
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: So 21.06.09 19:04 
Man könnte mit Suche im MSDN WAITFORSINGLEOBJECT daraufwarten bis der Prozess signalisiert wird. Oder man fragt mit Suche im MSDN GETEXITCODEPROCESS den Exitcode des Prozesses ab.
Gewuerzgurke Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 152

Win XP
Lazarus
BeitragVerfasst: So 21.06.09 19:29 
Danke, GetExitCodeProcess funktioniert:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
var ExitCode : LongWord;

(...)  // Und

 GetExitCodeProcess(Process,ExitCode);
 if (ExitCode = 0then (...)

:D