Link to home
Start Free TrialLog in
Avatar of anandd
anandd

asked on

Interacting with console programs

Hi all,
I have a requirement of interacting with a console program programatically. The console program when run, opens a command prompt window and waits for some user input. When the user enters his command and presses the enter key, the program displays the result output.

Now, I want to do all these through available windows APIs like CreateProcess, GetStdHandle, WriteConsole etc. My program should be able to start the console program, issue commands to it and capture the output from the console program into a string.

If any of you have a sample code or can halp me in any way, please do.

Thanks in advance
Anand
ASKER CERTIFIED SOLUTION
Avatar of Salte
Salte

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This question didn't show any activity for more than 21 days. I will ask Community Support to close it unless you finalize it yourself within 7 days.
Unless there is objection or further activity,  I will suggest to accept

    "Salte"

comment(s) as an answer.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
========
Werner