Board index » delphi » More on running DOS from Windows... NTVDM

More on running DOS from Windows... NTVDM

I discovered that "access denied" was (apparently) due to running the dos
program with flag DETACHED_PROCESS. Looks like this is no-no. I changed
instead to CREATE_NEW_CONSOLE, which worked (but couldnt
capture the text) but each time I ran, a new empty DOS box appeared despite
a freeonterminate flag. In addition, NTVDM processes appeared and
hang around. Tried no flags at all and the DOS program didnt actually do
anything despite no error message but did leave a bunch if NTVDMs around
chewing CPU. So what is secret of starting a DOS box and have it cleaned up
on completion?
 

Re:More on running DOS from Windows... NTVDM


Not sure whether this can do your trick, but:
Could you try to spawn cmd.exe instead (with appropriate params to run
whatever DOS app you might want if any), let it handle starting up the
16bit subsystem, and use its console handle to do whatever you might
need to do (... I saw "capture text" in your post.)

If this does not apply, please ignore. :)

Vlad.

In article <8nctdn$2kn...@news.comnet.co.nz>,
  "scaddenp" <P.Scad...@nospam.gns.cri.nz> wrote:

Quote
> I discovered that "access denied" was (apparently) due to running the
dos
> program with flag DETACHED_PROCESS. Looks like this is no-no. I
changed
> instead to CREATE_NEW_CONSOLE, which worked (but couldnt
> capture the text) but each time I ran, a new empty DOS box appeared
despite
> a freeonterminate flag. In addition, NTVDM processes appeared and
> hang around. Tried no flags at all and the DOS program didnt actually
do
> anything despite no error message but did leave a bunch if NTVDMs
around
> chewing CPU. So what is secret of starting a DOS box and have it
cleaned up
> on completion?

Sent via Deja.com http://www.deja.com/
Before you buy.

Other Threads