2

In my C# application, I need to start a child process in suspend (to register its ProcessID to some profilers) and then run it.

achieving this was possible by using the native CreateProcess() Api. my problem is, I can't figure out how to redirect its stdout and stderr back into my C# application in real time.

before the need for the suspend option, I used System.Diagnostics.Process's "OutputDataReceived" and "ErrorDataReceived" to get the output in real time do some parsing on it.

my question is: how can I achieve the same behavior using "CreateProcess()" ?

user3228001
  • 33
  • 2
  • 5
  • 1
    http://stackoverflow.com/questions/4112097/how-to-capture-a-processes-stdout-and-stderr-line-by-line-as-they-occur-during?rq=1 – Gabriel Mar 03 '15 at 16:30
  • 1
    @Gabriel, that works for System.Diagnostics.Process not the native CreateProcess() – user3228001 Mar 03 '15 at 17:44

0 Answers0