4

Possible Duplicate:
How can I run an external program from C and parse its output?

If you run a Windows command from inside your program (let's say ipconfig as an example), how do you read the output the system gives you back into your program for processing?

Community
  • 1
  • 1
Smarty187
  • 41
  • 1
  • 3

1 Answers1

3

See Creating a Child Process with Redirected Input and Output on MSDN

Alternatively, you can use _popen for simple capture of output.

Erik
  • 88,732
  • 13
  • 198
  • 189