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