If you write to your own stdout (as I assume the application does), you can't read it back in. You have to substitute stdout and stderr with some mechanisms that will redirect the data elsewhere. Otherwise you have to modify all calls to printf() and fprintf() in the original code to send the data to some other place. You should be able to simply undef printf and define a new function or macro with this name and then rebuild the application.
Bookmarks