Re: Exception launcing processes
- From: "Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT com>
- Date: Fri, 20 Oct 2006 08:54:08 -0700
OK, sorry. The text of the exception?
Paul T.
<andrerus@xxxxxxxxx> wrote in message
news:1161332625.534426.64880@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Probabibly I should be explicit, however I'm developing for Mobile,
this code is fulli supported by WinCE.
Andrea
Paul G. Tobey [eMVP] ha scritto:
You realize that you posted this to a Windows CE, not a Windows desktop,
group? I think you'll have a better chance of getting good help in a
more-appropriate group.
Paul T.
<andrerus@xxxxxxxxx> wrote in message
news:1161297371.890676.30520@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi, I'd like understanding why, when I launch a process from inside my
application I receive or no an exception, depending on the program I
try to launch. This is the code I execute:
externApp = System.Diagnostics.Process.Start(fullnameApp, "");
IntPtr hwndExt = IntPtr.Zero;
do
{
System.Threading.Thread.Sleep(500);
externApp.Refresh();
hwndExt = externApp.MainWindowHandle; //this line throws
InvalidOperationException
}
while (hwndExt.Equals(IntPtr.Zero));
If fullnameApp = "/Windows/calc.exe", no exception occurr,
if instead fullnameApp = "/Windows/iexplore.exe" exception is thrown.
Analising both cases with debugging before executing the impeached line
I saw that in first case it has exited field and HasExited property =
false, instead in the latter, in a first moment exited field is false
and HasExited true, but then both became true, even if the process is
still alive.
Which is the reason of it?
Thanks,
Andrea
.
- Follow-Ups:
- Re: Exception launcing processes
- From: andrerus
- Re: Exception launcing processes
- References:
- Exception launcing processes
- From: andrerus
- Re: Exception launcing processes
- From: Paul G. Tobey [eMVP]
- Re: Exception launcing processes
- From: andrerus
- Exception launcing processes
- Prev by Date: Re: Using COM OutProc server on WinCE
- Next by Date: Re: Larger(r) menu Font in Win CE
- Previous by thread: Re: Exception launcing processes
- Next by thread: Re: Exception launcing processes
- Index(es):
Relevant Pages
|
Loading