Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


Killing 16 bit apps in NT

 Keywords: close 16 bit vdm

Question:

Hi,
Is there a quick (clean or dirty!) way to close a 16 bit app in NT? I have tried IntControl 56 but that doesn't work - I presume because the app is running as a sub process under ntvdm.

Answer:

Yes, that's the problem. If there are no other 16-bit apps running, you could use IntControl 56 to kill the whole vdm (ntvdm.exe). There is a way to kill individual 16-bit apps within a vdm, but it's not supported by WinBatch (maybe in a future version), and Microsoft recommends killing the whole vdm as a cleaner method. If it's an app you are launching with WinBatch, you could first use IntControl 51 to specify the CREATE_SEPARATE_WOW_VDM flag, so the app would run in its own vdm, but there could be a problem with IntControl 56 distinguishing among multiple instances of ntvdm.exe.

Of course if the app has a window, you could try using WinClose or sending keystrokes.


Article ID:   W14855