In my console app I've created a process by using CreateProcess method. Now, this process either writes to the console "OK" or "Not OK". How can I intercept that information so I can as well as to console write it to a file?
CreatePipe
to create an anonymous pipe. See Creating a Child Process with Redirected Input and Output on MSDN for full details.