WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Killing and Terminating Apps

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Killing 16 bit apps in NT

Keywords:   Killing 16 bit apps NT

Question:

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:   W14861
File Created: 2001:11:08:12:40:38
Last Updated: 2001:11:08:12:40:38