Issue With Redirecting stdout prior to DOS program Exiting

G

Guest

Hello Everyone,


I am currently working on writing a GUI wrapper for a Menu driven DOS
Program. What I was looking on doing is redirecting stdout/stdin to a stream
and read/write similar to a file. My issue is that I try to read from the
stdout stream and never get anything only if the program has exited. Is there
a way of reading the redirected stdout from a DOS program in say real time? I
have tried the async (BeginOutputReadLine) and sync (readline()) to no avail.
If anyone had any experience to share that would be greatly appreciated.

Thanks,
 
C

Chris Dunaway

pp4175 said:
Hello Everyone,


I am currently working on writing a GUI wrapper for a Menu driven DOS
Program. What I was looking on doing is redirecting stdout/stdin to a stream
and read/write similar to a file. My issue is that I try to read from the
stdout stream and never get anything only if the program has exited. Is there
a way of reading the redirected stdout from a DOS program in say real time? I
have tried the async (BeginOutputReadLine) and sync (readline()) to no avail.
If anyone had any experience to share that would be greatly appreciated.

Thanks,

It can be done, but only if the DOS application outputs to the standard
output stream. If the DOS app uses direct writes to screen memory for
it's output, I don't think redirecting its output will help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top