Shawn,
>Thanks for the thought :) I gave it a try, and am still getting the exist
>same error :-/
OK, after looking further at your code, there are some other things
that I find confusing:
>if (si.hStdError != IntPtr.Zero || si.hStdOutput != IntPtr.Zero ||
>si.hStdOutput != IntPtr.Zero)
>{
> si.dwFlags |= (int) AdvApi32.StartFFlags.STARTF_USESTDHANDLES;
>}
At this point, you haven't assigned anything to any of those handles
in the StartupInfo struct other than IntPtr.Zero (unless you left out
some code). Does that mean you never set the STARTF_USESTDHANDLES
flag?
>si.hStdOutput = hRead;
Here you're assinging the *read* handle to the output. Surely it's the
*write* handle you should pass to the new process, since it will write
to those pipes.
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Shawn Anderson - 16 Jul 2004 23:54 GMT
No, it means that I cut and pasted the code in the wrong order.
but good catch...
Shawn
> Shawn,
>
[quoted text clipped - 22 lines]
>
> Mattias