Interaction with an external program.

  • Thread starter Thread starter Daniel
  • Start date Start date
D

Daniel

Hi,
Does anyone know if it is possible to interact with another console
based program. For example, relaying data back and forth between the
user and the program.

ie.

1. User interacts with C# program.
2. C# program accepts input and sends to console program as if it was
std input
3. console program interprets commands and then sends its output to
stdout.
4. C# program reads this output and displays it to User.

Any help would be greatly appreciated.

Thanks,

-- Daniel
 
Hi.
If all parts of your system are written using C# or VB.Net, you can use
Remoting to comunicate between application domains.
Regards.
 
Sharon,
Thanks for the suggestion - but unfortunately the program I am wanting
to interact with is not a program I have written, and is also not
..Net.

Thanks anyways,
-- Daniel
 
Thanks for the suggestion - but unfortunately the program I am wanting
to interact with is not a program I have written

You would still need to modify the program in any case, unless std OS piping
would work for you. Have tried getting creative with piping data to it?
Other then that, you could use namedpipes, memorymapped files, std files,
etc to talk between the processes. You would still need some pinvoke on the
..net side (unless using files) and updates to the other program also.
 
Back
Top