locked
Getting output from the command line which is executed by CreateProcess????? RRS feed

  • Question

  • Hi All,

    I want to execute an exe file, and I want to get the output that results from this exe file.

    To execute an EXE file I can use CreateProcess function but how can I get the output from this execution, "I don't want the returned value of the CreateProcess, I need to output returned by the EXE file"?????


    I hope that there's a solution for this ...........

    Regards
    Saturday, May 16, 2009 6:18 AM

All replies

  • Depends on how the output is being produced. If it's using printf or something along those lines to write to console you'd have to hook those calls.
    Friday, June 12, 2009 4:18 PM
  • You may pass an stdin and an stdout to a child process via the STARTUPINFO structure.  There are examples of how to do this correctly on MSDN and elsewhere on the web.

    Tuesday, June 16, 2009 8:19 PM