Hi all!
I need to run couple of .exes one after the other.What I also need -- is to know exactly when one .exe finishes ..to start the next one.To run my programmes I use
createprocess() api...
The WaitForInputIdle function enables a thread to suspend its execution until a specified process has finished its initialization and is waiting for user input with no input pending. This can be useful for synchronizing a parent process and a newly created child process. When a parent process creates a child process, the CreateProcess function returns without waiting for the child process to finish its initialization. Before trying to communicate with the child process, the parent process can use WaitForInputIdle to determine when the child's initialization has been completed. For example, the parent process should use WaitForInputIdle before trying to find a window associated with the child process.
How come you are not using shellexecute()? Attitude is Everything
i think i did't explain myself properly (english is a beach )) )
anyway ... i am running .exe ... whatever i need to know -- is when it stops ( when .exe is not running anymore) ..Basically ..whatever you see in the task manager under processes -- i would like to see... For example I am running NotePad.exe ... then i am releasing it ... how to know in FoxPro that i stoped running it ?
look at the FAQ184-1998. you can modify the code to get all window titles. if your title is not shown the program is not running.
you said that you are using createprocess to run the programs. if you are then the post about WaitForInputIdle is the api function to use to track if program is not running. Attitude is Everything
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.