> It is. You get the pid for CMD.EXE returned from Createprocess and you
> can stop it no trouble. The 16-bit applications running under it however
are
> run in NTVDM. Killing CMD.EXE doesnt stop them. WM_CLOSE messages
Ah - I see the confusion.
16-bit apps you launch from the CMD.EXE shell don't run "under it".
Once they get launched they don't have any connection with the CMD
shell. just like when you start them from the command line.
I misunderstood. I thought you said you were running a .BAT
file. .BAT files _DO_ run "under" the shell so terminating the CMD.EXE
process would terminate them.
Can you run (CreateProcess) the program yourself directly instead of
indirectly via the shell? If you can - run it "in it's own
memory space" (CREATE_SEPARATE_WOW_VDM) and save the pid you get
back - it will be the pid for the NTVDM.
Enum childwindows (for all windows) and use GetWindowThreadProcessID
to determine the pid for each hwnd enum returns. Then post
(not send) a WM_CLOSE or WM_QUIT message to those hwnds.
Or does your note about it "not using STD_OUTPUT" refer to a problem
with using CreateProcess to run the 16bit app directly? CreateProcess
lets you redirect the output - to files or pipes - is there some
reason you can't do that with this program?
ns
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"