Eventuell ist ja
WaitForInputIdle das, was du sichst:
Zitat:
The WaitForInputIdle function waits until the specified process is waiting for user input with no input pending, or until the time-out interval has elapsed.
Musst du mal gucken, ob es dir hilft.