I need to run, send data, retrieve the data it then outputs to a textbox all from a .COM file.
I think that squares it up.
Help please!(Please include source, I'm lazy and have no idea how to do this!)
Printable View
I need to run, send data, retrieve the data it then outputs to a textbox all from a .COM file.
I think that squares it up.
Help please!(Please include source, I'm lazy and have no idea how to do this!)
I could use a little more info. What is the nature of the .COM (DOS executable) program? Can its output be directed to a text file? If so, your VB program could then read it in and display it in a textbox. If you can supply more details, I'll see if I can help.
My program will send data to the COM file after my program opens it.
program send to COM: wassup
COM file displays: true
text1.text receives: true
then close the COM file
I'll be sending and 8 character string and it'll display an 15 character string.
Opening it and sending the data doesn't seem to hard but getting the 15 characters it outputs is the hard part.
Or if you know how to decompile a COM file, just as good.
The only thing I can think of is that when you run a DOS program, you can redirect its output with the > symbol. For example, if you want the output of the DIR command to go to a file instead of the screen you can say:
DIR > C:\whatever\mydir.dat
If you can do something like that when you execute the COM file, you'll have what you need in the file.
Other than that, I would turn this question over to one of the many capable gurus on this forum.
Good luck.