Capture DOS output after CreateProcess
I want to run the CreateProcess method in a console session in which I can do some subsequent processing to capture response output coming from a remote computer that is generated after the process I have run using CreateProcess has completed.
The output that follows my CreateProcess command cannot be piped so somehow after my initial command has been completed I would like to capture the output that I see in the console window when I run the process via a batch file.
Are there some special parameter settings I should use for calling CreateProcess in this instance? What could I use to capture the response output? At the moment only ReadConsoleOutput looks useful to me.
Adaption of Console example
The Console example that you have pointed me to is a totally independent solution as far as I can see. I am needing to get this functionality of which I have spoken into an existing ActiveX component so am uncertain if this example will help but I will take a look at it and see.
No use of ReadConsoleOutput
I believe the method I should be using is ReadConsoleOutput. The Karl Peterson example you have pointed me to makes no use of this API at all.