The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: box on October 07, 2010, 07:11:24 PM

Title: Best way to read characters from a 16-bit DOS app in NTVDM?
Post by: box on October 07, 2010, 07:11:24 PM
I want to write a 32-bit windows app that can read the text displayed by an old DOS game - should I be hooking into standard output somehow, or do I need to find the video memory somewhere in the ntvdm process and read that, or something else?

any suggestions appreciated
Title: Re: Best way to read characters from a 16-bit DOS app in NTVDM?
Post by: vozzie on October 07, 2010, 10:34:42 PM
Hy,

If it's standard output you want to read. I've tried the attached CreateProcessAndRedirectOutput procedure with a 16 bit app. First it didn't work, but using CMD as middle process it does,...

cmd /c the16bitapp

Another way would be

cmd /c the16bitapp >> temp.txt

Greetings
Title: Re: Best way to read characters from a 16-bit DOS app in NTVDM?
Post by: box on October 08, 2010, 07:28:11 PM
Thanks for the reply, I couldn't get that to work and ended up just using ReadProcessMemory.