Click to See Complete Forum and Search --> : Redirect standard output of child process to a MFC window ?


April 10th, 1999, 12:36 PM
Is it possible to redirect the standard output of a child process to a MFC window of parent process ?

Jerry Coffin
April 10th, 1999, 07:03 PM
Yes and no. You can redirect the standard input and output of the child to anonymous pipes, and then read and write the pipes in the parent, for example displaying the child's output in a window of your choice.


The universe is a figment of its own imagination.

jhattingh
April 26th, 1999, 05:50 AM
I have accomplished this, but found that the input "arrives" en masse - when the child process is completed (defeating the object of my app). How do I receive this information as it is generated?

Boy is it hard to find out this information!!

I understand there are 2 possibilities:

1. Turn off buffering in parent process (but how!?!)
2. Use a different method:
- NamedPipes is this possible?
- Use CreateFile with CON passed as filename. Still not sure how to implement the CreateFile method, even if it IS possible!!

Can you help?