LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

running a DOS executable from labwindows/CVI

Hello,
I have a standalone DOS executable application. This program is used to control an instrument. This application takes in some user keyboard inputs to produce some output.
I do not have the source code of this application but I want to have a WIN32 GUI on the front end which could somehow communicate with the DOS application. I was wondering if this is possible in labwindows/CVI or visual basic.

Thanks.
tmach
0 Kudos
Message 1 of 3
(2,708 Views)
The possibility of passing input to a DOS application is determined by the specific application. You would normally pass parameters to it from the command line and if that is possible you would be able to pass information on to it. If it's a sequential input. i.e. waiting for user input and continue processing, it's waiting for keyboard input. At this point you can only pass information to your application from the keyboard or you can mimic the keyboard input by sending windows messages to your application by getting into the windows messaging stuff. This is not trivial and there is not a lot of help available once you go down this road. Sending info down by mimicking the keyboard is one thing, but then catching the response is even more messy, because there is
a lot of traffic constantly coming back to the display and you would be trying to filter messages with only relevant response.

So in short, you need to be really sure that you really want to do this and that there is no other option out of this. This is a messy approach but most rewarding because you will learn a lot and you'd be able to advise people not to go down that road. 🐵

If you still insist in doing this, let me know and I'll point you to some of the information that might be helpful. I will have to dig into some old code as I can not remember the stuff of the top of my head now.
Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd
Message 2 of 3
(2,708 Views)
You could try using code in the attached project which shows how to spawn
and interact with a Windows console app. It might work with a DOS app too.
But no guarantees.



[Attachment console.zip, see below]
Message 3 of 3
(2,708 Views)