Yes, if you run the program yourself:
in CreateProcess , you pass STARTUPINFO where you can specify descriptors for SDIN, STDOUT and STDERR. Note that oyu must be provided with all three as soon as you specify the STARTF_USESTDHANDLES flag.
In addition, the descriptors must be inherited (otherwise the child process will not be able to access them), so SECURITY_ATTRIBUTES should basically look like this:
SECURITY_ATTRIBUTES secattr = { sizeof(SECURITY_ATTRIBUTES), NULL, TRUE };
You can open descriptors on disk files containing output and output data. Alternatively, it can be Pipes , which can be read / written gradually while the console application is running.
source share