Similar Threads:
1.Windows CE + C# : How to redirect stdout/stderr of child process?
I'm developing a Windows CE 5.0 app using C# and I need to call a child
process and then capture its stdout into a window. The solutions I've
read online for doing this involve either using the CreateProcess(), a
Win32 API function which isn't easily accessible in a C# app, or using
the System.Diagnostics.Process class which seems to only have stdout
redirection capabilities in Win32, but not CE. So what are my best
options?
2.child process with redirected stdout and stderr
I need to create a child process and read the child's stdout and stderr in
the parent process. This seems to be surprisingly difficult to do in .NET.
The documentation for the System.Diagnostics.Process class talks about
creating separate threads for reading each stream.
Is there an easier way? Has anyone already written a wrapper?
Thanks.
3.Redirecting stdout/stderr on child process to a window
I'm developing a Windows CE 5.0 app using C# and I need to call a child
process and then capture its stdout/stderr into the textbox of a
window. So I'm P/Invoking the CreateProcess() function and the
SetStdioPathW() function. However, it seems that SetStdioPathW() is
intended for redirecting output to a file, not a window. What should I
be using instead?
4.Redirect stdout/stderr on spawned process (was TerminateProcess does not immediatly exit the process)
"OT" < XXXX@XXXXX.COM > wrote in message news:f1q0cq$ak0$ XXXX@XXXXX.COM ...
> the problem is:
> - the external exe file can take a very long time to do its work, so
> i want to give the user the possibility to say "ok, i'm boring. I
> want to quit and i want to quit now".
> The only way to quit now is to kill the process ng_dist.exe, since
> it only quit when it finishes to write its output.
> - the same external exe file uses stdout and stderr to give back data,
> so if I run
> CreateProcess( ..., "cmd /d ng_dist.exe 1>output.txt 2>err.log", ...)
> it works but if I run
> CreateProcess( ..., "ng_dist.exe 1>output.txt 2>err.log", ...)
> it seems to work (CreateProcess returns nonzero) and i can see
> ng_dist.exe running in the task manager, but it dosn't write
> anything on any file!
>
> the solution (?)
> - i'm afraid the only solution is to have a new release of the external
> exe file to avoid the use o stdin / stdout. Is it correct?
>
So the question has become, how to use CreateProcess() and specify
redirection of stdout and stderr to files. I'm afraid I don't know, but I
renamed the Subject to hopefully attract more appropriate attention.
Thanks,
David
5.Capturing spawned child process's STDOUT & STDERR
Hello,
I'm using _execvpe (Win32 console project in VS.NET)
to spawn a child process. I would like to know if you
have any pointers on how to capture the child's STDOUT
and STDERR? Any help is greatly appreciated.
Thanks,
Sri