I have been researching this issue for a few days now and have devoured multple MSDN/Win32 API resources, forums etc.. without a solution. I have written a GUI based C++ application that is basically an overlay for a consle executable that I do not have access to the source code for.

The console application iterates through a file system for certain file types and returns a count when finished. My GUI application builds out a text file and supplys it as a parameter to the executable, then kicks it off.

My problem is capturing the output from the executable and logging it to a text file. Does anyone have code examples of how to capture standard output from a console application spawned as a process from within a C++ GUI app?

I am using CreateProcess to actually spawn the app and would love some resources on how to get this figured out....

Thanks!