473,396 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Help Controlling external console app

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/U...les/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,
Nov 15 '05 #1
1 2291
Check out WriteConsoleInput/Output and ReadConsoleOutput/Input APIs

-vJ

"Doug Perkes" <do**************@nospamhere.bankofamerica.com> wrote in
message news:00****************************@phx.gbl...
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/U...les/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,

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: serge calderara | last post by:
Dear all, I have an application which is suppose to start another executable process. As soon as that process is running, I need to retrive its handle. The problem of the particular process I am...
8
by: Andrey Mosienko | last post by:
We are using PostgreSQL about two years beginning from version 7.0. I have one question about starting postmaster: Is there way to detach it from the controlling terminal under FreeBSD? My...
1
by: cplusplusstudent | last post by:
Hello I am a new C++ programmer and am working with the Visual C++ studio. I am attempting to create a simple console application for myself but I fin that neither of the introductory C++ books...
2
by: Lonifasiko | last post by:
Hi group, I must launch from my Winforms application another application (.exe developed by the client) which response time sometimes can be more or less 30 seconds. I'm using ProcessManager...
1
by: =?Utf-8?B?Q3JhaWc=?= | last post by:
Hi Guys, I am trying to caputre the output for an external application. The idea is to use the System.Diagnostics.Process to run the exe in a process and redirect the output to a string. When...
1
saranjegan
by: saranjegan | last post by:
hello, am in need to access a application when i press an external keypad (which i had connected to the serial port of the system and am recieving a value at one press of the key,i can open...
4
by: Joergen Bech | last post by:
Just out of curiosity: What is your favorite method of making sure that anything that happens on a form, only happens in response to a single, external event? Take the example below. I have made...
6
by: Paulers | last post by:
Hello, I am trying to manipulate a console based application from another application for example I need to launch the console application, provide it input and take the output from the console...
0
by: Alistair George | last post by:
Hello all. I have been trying to find an api that works with external (not card) devices so that the application works with all types of product, eg all-in-one wifi/adsl/router such as Dlink...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.