I want a create a C++ program that can find an already running process and then redirect its Standard Output to my own stream for re-direction. I can find countless examples on how to start a new process but I want to try and do something like:
Process^ proc = new Process();
proc->Attach("notepad.exe");
And then have control over the already running notepad.exe process.. Is this possible? If not then I guess I can find a way to start the process from within my application, however then my question would be how can I start a process and send command-line arguments to the process as if I were starting it up in console.