run-hidden
run-hidden copied to clipboard
Redirect stdin, stdout and stderr
Would it be possible to redirect standard streams so that an app can run an other in a hidden window, but still get its output ?
I tried this :
si.hStdError = stderr;
si.hStdInput = stdin;
si.hStdOutput = stdout;
just before CreateProcess, but it didn't work.
just reading stdout and stderr when process exit and write them back to own stdout and stderr would be fine with me. But if it is possible to set up a plain redirect for all standard streams it would be ideal.
I've never wrote much C/C++ code, and also don't have much experience with console IO. It probably can be improved, but I probably won't do it.