processautomationelement

I want write process Synchronization for .Net application


I am automating my .net application using AutomationElement I want to write process synchronization for my framework. Is there any WINAPI .net API which can tell us whether process is busy or not.I am using Windows 7 OS and .Net 4.0 framework..

Regards, Raj


Solution

  • Take a look at WaitForInputIdle Win32 API function.

    It 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.