get the process Id, just create the proc and then run a loop to see if it's closed. when it does, break and you'll jump to the top of the for loop again.
Thanks, Tyler Littlefield Web: tysdomain.com email: [email protected] My programs don't have bugs, they're called randomly added features. ----- Original Message ----- From: Stephane Lesoinne To: [email protected] Sent: Tuesday, April 07, 2009 6:25 AM Subject: [c-prog] C language Hi, I'm trying to execute a loop on an external program file.exe in C program. I'm using _execl(...) command to achieve this on Windows XP with MSVC++ 2008. I've succeeded in running one instance of the process and now I would like to execute the program file.exe many times but starting a new "file.exe" process should wait the previous instance termination. If I only do int i; for(i=0;i<3;i++){ _execl("file.exe","test",NULL); } this doesn't work because, the three execution of file.exe are started too fast. So, how can I pause the execution of the calling process till the the resume of the current file.exe process ? Best regards. Stéphane Lesoinne. [Non-text portions of this message have been removed]
