Home All Groups Group Topic Archive Search About

How to determine when a process has finished initial loading

Author
19 Sep 2006 4:44 AM
Notre Poubelle
Hello,

Is there a standard way of determining when a process has finished its
initial loading, such that it is ready to accept commands?  For example, I am
starting Visual Studio (devenv.exe) from my own program.  I would like to
perform some actions (like open a file), when Visual Studio is ready.  Is
there a way to test when an application has finished displaying its main
window and is ready to accept user commands?

Thanks,
Notre

Author
19 Sep 2006 9:03 AM
Gary Chang[MSFT]
Hi Notre,

I noticed you also posted a similar issue in the
microsoft.public.vstudio.extensibility newsgroup, I will follow up to there.

Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Author
20 Sep 2006 6:09 PM
Carl Daniel [VC++ MVP]
"Notre Poubelle" <notre_poubelle@online.nospam> wrote in message
news:1383A949-1946-462B-B378-07D63B19AAE1@microsoft.com...
> Hello,
>
> Is there a standard way of determining when a process has finished its
> initial loading, such that it is ready to accept commands?  For example, I
> am
> starting Visual Studio (devenv.exe) from my own program.  I would like to
> perform some actions (like open a file), when Visual Studio is ready.  Is
> there a way to test when an application has finished displaying its main
> window and is ready to accept user commands?

See

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/waitforinputidle.asp

http://www.pinvoke.net/default.aspx/user32/WaitForInputIdle.html

-cd

AddThis Social Bookmark Button