Re: custom shell starts before all services loaded

From: KM (konstmor_at_nospam.yahoo.com)
Date: 03/19/04


Date: Fri, 19 Mar 2004 11:17:03 -0800

Greg,

I did not quite get what your requirement is. Do you just want to launch your shell app and know when user input is available in it?
Then you should look at WaitForInputIdle API. You may end up launching a very small app as your shell. The app will run your heavy
shell through CreateProcess and during the launching time it may show a splash screen. If you call to WaitForInputIdle with the
handle from CreateProcess, then you know for sure when user is able to do anything within the shell UI.
More detail, " ... the calling thread can use the WaitForInputIdle function to wait until the new process has finished its
initialization and is waiting for user input with no input pending. This can be useful for synchronization between parent and child
processes, because CreateProcess returns without waiting for the new process to finish its initialization. For example, the creating
process would use WaitForInputIdle before trying to find a window associated with the new process.".

--
 KM,
    BSquare Corporation
> I found other posts similar to this on google, but no responses...
>
> My custom shell starts, but no user input is available for several seconds.
> I guess I could use EnumProcesses to wait until something starts, but not
> sure what to wait for.  The only thing I saw resembling a reply was a
> suggestion that the startup app just wait 'a bit' until it started the
> actual gui.  I was hoping for something a little more deterministic.
>
> Thanks,
>
> Greg


Relevant Pages

  • Re: Vanishing threads in shell-script-started process on solaris 10
    ... Originally, app ... I saw all the daemons running with all their threads intact ... Next I tried launching the daemons from bourne shell command line as ...
    (comp.unix.solaris)
  • Re: Auto Restart a Custom Shell on termination
    ... When I deal with different shells for Windows OSes I also prefer writing my own agent app that will take care of launching whatever ... - have a peice of code in your custom shell app to launch explorer.exe ... > I'm still wondering why this functionality do not work for your shell also. ...
    (microsoft.public.windowsxp.embedded)
  • Re: Return Value from Background System Call
    ... The meaning of a 0 exit status has to be interpreted in the context of the ... launched app. ... Since you're launching this app in the ... status of the shell that launched your background app" at the end of the ...
    (comp.lang.perl.misc)
  • Re: Automation issue (threading)
    ... launching them, waiting for user input, and then launching the next app? ... then you might want to use the Process class to find the instance of ... the app that you launched through automation, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: custom shell starts before all services loaded
    ... I created a small app for my custom shell which then starts my main app, ... > Then you should look at WaitForInputIdle API. ...
    (microsoft.public.windowsxp.embedded)