I wanted to call _popen to get the results from an executable but it was blanking out.
I looked in debugger and found out the program uses Kernel32.WriteConsoleW to write a unicode string to the console, instead of using stdout.
How do I capture it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should be able to redirect the Output of a child process.
Have a look at Creating a Child Process with Redirected Input and Output
Furthermore the application might use STD_ERROR_HANDLE instead of STD_OUTPUT_HANDLE.