I have a Win32 app and with that app i'm going to open another .exe file. That other .exe file is a console app and it will write some data to that console. Now i was wondering if there's anyway my win32 app can read the output of that console..??
Printable View
I have a Win32 app and with that app i'm going to open another .exe file. That other .exe file is a console app and it will write some data to that console. Now i was wondering if there's anyway my win32 app can read the output of that console..??
The calling app should be able to receive the return value of the other program. But this of course is only a integer value. In Unix, one console application can take another application as a parameter and pipe it's output into that program.
I'd redirect the output of that console program to a file ( via myexe.exe > "out.txt" ).
Your Gui App could then read that file.
Kurt
Well, you can either output the console to a temporary file, or you can use pipes.
Here's an example of redirecting stdin, stdout, and stderr using CreateProcess and pipes.
Viggy