-
You know how you can use a DOS program in the prompt window and interact with it? Well, how can you write your own console like that? I'm not too interested in writing a console, but I do want to be able to recieve feedback when I execute a DOS program from mine.
-
output from DOS program
hi,
i wanted to do the same thing .
If u want to just get the results y not redirect ur o/p of a program to a file and read it?
eg:
if u want to get output of dir/p/w
open up a batch file,
redirect by typing dir/p/w >>x.txt
and use shell "c:\x.txt",1
to open it?
one question :
how r u executing ur dos program?
-
The outputing to a file does not apply to all DOS programs, so it is not the answer I need. :) Matter of fact, that is the only answer anybody has ever given me.
I'll execute it by either using the built in Shell function or the API ShellExecute function. I use either one depending on the circumstances.
-
Hi, I looked through some code I have, and found that if you want to read output from a DOS program on the console, you can do that with ReadConsole(). IT is in the Kernel32.dll. If you want a code example, I'll send it to you, or put some here.... :)
-
I've done some research into it and found a whole suite of console related functions in the MSDN. That is excellent, and I believe this is exactly what I was looking for. Thank you very much! :) However, the API Guide at www.allapi.net doesn't give an example of it's use. All I have to go on is the MSDN and the allapi.net toolshed which gives me the VB syntax for the functions.
So I'd very much appreciate it if you have an example to send me either here or as an attachment to [email protected]. I'm so greatful that I'd be willing to help you out on any question that you may have concerning VB or API. I just may be able to be of some help.
You are the first person to actually answer a question of mine correctly. :) As time goes by it gets harder and harder to find solutions to my problems.
-
Output from DOS programs
hi,
:)
i'd like to hav the copy of the code too!!!
thanks,
lxs
:)
-
I'm also banging around on the whole recieving interaction with the DOS program and am kind of having a bit of trouble getting the right API calls in order. I'd like to see the code for that too. could you please post here or send it to me too at [email protected]