Help Controlling external console app

  • Thread starter Thread starter Doug Perkes
  • Start date Start date
D

Doug Perkes

I have a legacy console application that I need to
control with a c# desktop application. The main
functionality i need is the following:

Send strings
Read strings at specific locations
Send function keys (F3, F4, etc)

I have used the code from Extended Functionality for
System.Console
(http://www.gotdotnet.com/Community/UserSamples/Details.as
px?SampleGuid=b76d1f08-2d79-47bd-825b-0489938aae0f) and
have been able to attach to the console application's
process using AttachConsole and GetStdHandle Win32 API
functions, but can't seem to figure out how to send
strings to the console app or read output from the app
into a string.

Can anyone help?

Thanks,
 
Back
Top