473,404 Members | 2,187 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,404 software developers and data experts.

How do I redirect output from a DOS app into DotNet app (pipe)

I want to take the output of a DOS console application that just streams data
to the screen and redirect that output in real time into a C# application
that will decode and reformat it for display. I know I could redirect from
the DOS application into a file and then read the file, but I want to do this
in real-time so I can affect the output of the DOS application and
immediately see the results in the C# app.

The DOS application is not ours, and there is no option to re-write it.

Can anyone point me in the right direction to get this done, or tell me why
it can’t?

Aug 12 '05 #1
1 2961
You need to to start the DOS application from within your C# application
using the System.Diagnostics.Process and System.DiagnostivsProcessInfo
classes. When you are setting up the info to start the process using the
ProcessInfo class you can redirect the standard output stream of the dos
application and send it to a StreamReader or some other .NET class that
derives from System.IO.Stream.

Hope this helps
--
Brian Delahunty
Ireland

http://briandela.com/blog

INDA SouthEast - http://southeast.developers.ie/ - The .NET usergroup I
started in the southeast of Ireland.
"Byron" wrote:
I want to take the output of a DOS console application that just streams data
to the screen and redirect that output in real time into a C# application
that will decode and reformat it for display. I know I could redirect from
the DOS application into a file and then read the file, but I want to do this
in real-time so I can affect the output of the DOS application and
immediately see the results in the C# app.

The DOS application is not ours, and there is no option to re-write it.

Can anyone point me in the right direction to get this done, or tell me why
it can’t?

Aug 12 '05 #2

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

Similar topics

2
by: Achim Domma | last post by:
Hi, I try to start a process on windows using win32process.CreateProcess and want to to redirect the output. I set the STARTF_USESTDHANDLES flag in the STARTUPINFO structure. But I can not...
2
by: Jason | last post by:
Hello, I have a class, transCore, that does certain work, and by default, prints its progress to the stand output. Later, I will to write a GUI class that encapsulate the transCore class. I...
2
by: Byron | last post by:
I want to take the output of a DOS console application that just streams data to the screen and redirect that output in real time into a C# application that will decode and reformat it for display....
2
by: 28tommy | last post by:
Hi there, I'm doing some TELNET and FTP sessions with my scripts. I need to redirect all the output (and not just what I print) to an output file, but still be able to see the session in process...
1
by: abcd | last post by:
I have a program which is written in C and interfaced with python via Swig. However, the function I call prints stuff out to the console. I would like to capture what it is printing out. I...
3
by: bonzo | last post by:
Hi, I have one external executable file that opens a file output.txt and writes something to that file. I need to catch anything that goes to that file and save it to a string object. I suppose i...
5
by: ws.taylor | last post by:
I am in a systems programming class, using C on a Solaris 10 development server. Part of the first programming assignment calls for the output of a command executed by a child process with execvp...
0
by: shravagiparag | last post by:
Hello, I am developing a console application to invoke gdb session and log in the communication between my application and gdb. I opened gdb as a new process and tried to redirect the input and...
2
by: ashokd001 | last post by:
Hi , How do i redirect output of topas to a file. i did not find any such option in topas command. Regards, Ashok
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.