Originally Posted by
tabstop
Based on what you're saying, I would guess that you are getting all the output from printf immediately when the C code prints it. You just need to actually process it in your event handler. Every time your C code prints a line, your event handler gets that info.
(Note that the example at the link Salem posted used WaitForExit before printing any output -- the event handler just added data to a big ol' string, which was printed at the very end in one go. Since WaitForExit, perhaps unsurprisingly, waits there until the calling program finishes, that may not be exactly what you want to do.)