DOS exec not receiving input from standard I/O...
-
I'm trying to use different functions like SendInput and SendKeys to send input for controlling a DOS program running in a Command Prompt window (very old DOS program - no source code). Both of the above functions work on a standard Command Prompt, but it doesn't work on the DOS program once I run it. It also seems that many of keyboard macro programs don't work on these types of DOS programs either. Does anyone know of how to send the key input in the way that many DOS programs are reading input from the keyboard? I solved this once a very long time ago using libs in Windows XP (still running this OS) but lost the code and my source of information :((.
Jeremy Props to the family: New Dawn Engineering
-
I'm trying to use different functions like SendInput and SendKeys to send input for controlling a DOS program running in a Command Prompt window (very old DOS program - no source code). Both of the above functions work on a standard Command Prompt, but it doesn't work on the DOS program once I run it. It also seems that many of keyboard macro programs don't work on these types of DOS programs either. Does anyone know of how to send the key input in the way that many DOS programs are reading input from the keyboard? I solved this once a very long time ago using libs in Windows XP (still running this OS) but lost the code and my source of information :((.
Jeremy Props to the family: New Dawn Engineering
It may be almost impossible. Some DOS programs talked directly to the hardware to get input and you can't do that in Windows unless you write a kernel mode driver. Even then it may still be infeasible. Get real and junk the DOS program - this is 2007!!!!
Phil
The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.
-
It may be almost impossible. Some DOS programs talked directly to the hardware to get input and you can't do that in Windows unless you write a kernel mode driver. Even then it may still be infeasible. Get real and junk the DOS program - this is 2007!!!!
Phil
The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.
Actually it is totally possible with a project right here on CodeProject!!! http://www.codeproject.com/cpp/sendkeys_cpp_Article.asp It took me this long to eventually find my functioning code, which led me back to the article. Now I just have to check that a C# version exists and if not I will convert the project myself. I am real, and I can't junk the DOS program because I work in the real world where you can't just re-write software on a whim to meet the latest craze, especially where it would be dangerous to do so (people's limbs at risk).
Jeremy Props to the family: New Dawn Engineering
-
Actually it is totally possible with a project right here on CodeProject!!! http://www.codeproject.com/cpp/sendkeys_cpp_Article.asp It took me this long to eventually find my functioning code, which led me back to the article. Now I just have to check that a C# version exists and if not I will convert the project myself. I am real, and I can't junk the DOS program because I work in the real world where you can't just re-write software on a whim to meet the latest craze, especially where it would be dangerous to do so (people's limbs at risk).
Jeremy Props to the family: New Dawn Engineering
I am glad you have found a solution that works in your particular case. I am real too, I make my living writing programs for the real world. DOS programs started to die ten years ago and no critical applications should rely on such programs any longer - hardware and software support is non-existent; it is a matter of chance whether they can be made to run now and there are absolutely no guarantees for the future (i.e. next week). Development of an alternative to the DOS app should have started at least five years ago. Whatever may be said against Windows there has never been a more universal, stable and consistent operating system on which to develop software for all sorts of applications. To speak of it as a "whim" and "the latest craze" is dangerously short-sighted, especially if people's limbs are at risk!
Phil
The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.