Capturing standard output of the process run from my app

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello.

I’m trying to capture standard output of the other process which is
launched from my win app. I tried to do it with freopen function which
captured content of the printf functions, but not the output of the other
processes (even if it used printf function and launched with system function).

How can I perform my task?
How should I run other processes?

Thanks for suggestions.
 
Ivan said:
I'm trying to capture standard output of the other process which is
launched from my win app. I tried to do it with freopen function which
captured content of the printf functions, but not the output of the other
processes (even if it used printf function and launched with system
function).

How can I perform my task?
How should I run other processes?

The usual advice would have your parent process creating "pipes" which are
used as the child's standard input and/or output devices. The child
unknowingly writes its output to a pipe. The parent reads from the pipe and
displays, parses, analyzes it as necessary. Details are here:

http://support.microsoft.com/?id=190351

Regards,
Will
 
Back
Top