CreateProcess and redirect StdOut to a text file
I am using CreateProcess to execute a command line call
I want to redirect the StdOut and StdErr to a text file
All the examples I can find show how to send StdOut to a pipe, by using CreatePipe and assigning the handle to STARTUPINFO.hStdOut
I dont want to do this as the output is huge and can exceed max buffer size...
I tried to use CreateFile to give me a handle to a new file, and gave this to both hStdOut and hStdErr of my STARTUPINFO, but the file always comes up empty!
Any ideas how to redirect CreateProcess StdOut and StdErr to a new text file!
All code on this page is protected by an SEP field!!!