I have an application which needs to run several other applications in chain. I am running them via ShellExecuteEx
. The order of running each of the apps is ver
If your application has some custom initialization logic that doesn't run in UI thread then WaitForInputIdle might not help. In that case you need a mechanism to signal the previous app that you're done initializing.
For signaling you can use named pipes, sockets, some RPC mechanism or a simple file based lock.
You can always use IPC and Interpocess Synchronization to make your application communicate with (and wait for, if needed) each other, as long as you code both applications.
You can probably achieve what you need by calling WaitForInputIdle() on each process handle returned by ShellExecute()
.
Waits until the specified process has finished processing its initial input and is waiting for user input with no input pending, or until the time-out interval has elapsed.