In msdn library, there is an example about "Creating a Child Process with
Redirected Input and Output".
now in my case, the child process whill use "printf" to write to its
stdout which is redirected to my pipe. but as you know, the "printf" is
buffered, so the problem is that the parent's "FeadFile" can not return when
the child has already use "printf" to write something. (!!!Note that the
child process is a third party application,I can't modify it, and the child
and parent are interactive, I must know what child had written in each step,
and I can't close the handle).
How can I solve this problem? Thank you very much.
Doug Harrison [MVP] - 10 Nov 2004 16:45 GMT
> In msdn library, there is an example about "Creating a Child Process with
>Redirected Input and Output".
[quoted text clipped - 6 lines]
>and I can't close the handle).
> How can I solve this problem? Thank you very much.
Unless you can tell the child process to unbuffer stdout or flush after
every write, there's nothing you can do. I don't know of any hidden way to
get a VC program to do these things.

Signature
Doug Harrison
Microsoft MVP - Visual C++