I can easily start a process with it's STD I/O redirected but how can I redirect the STD I/O of an existing process.
Process process = Process.GetProcessById(_RunningApplication.AttachProcessId);
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
string text = process.StandardOutput.ReadToEnd(); //This line blows up.
Exception:
StandardOut has not been redirected or the process hasn't started yet.
Side note: If you know how to do this in C/C++ I'd be happy to re-tag and accept. I just need to know if it's even possible.