The following files should be in VVMD.ZIP:
	MAKEFILE	the make file I used to assemble everything
	VVMD.ASM	source for the virtual device driver VVMD.386
	VVMD.DEF	.DEF file for linking VVMD.386
	VVMD.LNK	linker response file for VVMD.386
	VVMD.INC	include file for VVMD.ASM and TSTVM.ASM
	TSTVM.ASM	source for the DOS mode test program for VVMD.386
	TSTVM.EXE	executable DOS mode test program for VVMD.386
	VVMD.386	Windows virtual device driver 
	VVMD.TXT	This file

To use VVMD.386, edit your SYSTEM.INI file and add the following line
in the [386Enh] section:
	device=vvmd.386
Make sure you copy VVMD.386 into your \windows\system directory. This
allows any program running under Enhanced mode Windows to kill a
running VM. As it is written, it will not allow you to terminate the
system VM, nor the current VM (the one in which your program is
running). This is easy to change if you wish to recompile the
VVMD.ASM file, but is not advised. Note that both DOS and Windows
programs can delete a VM. The sample test file shows how to do it
from a DOS program. The very same method is used to do it from a
Windows program.

The basic idea is this: 
	1) Make sure that Windows is operating in Enhanced mode
	2) Get the VVMD API entry point from Windows
	3) Make sure it is a valid address
	4) Check to see that VMMD returns the expected version number
	5) If you already know the handle of the VM you wish to
	terminate, then just put it in the EBX register and call the
	appropriate API function.
	6) If you do not know the VM handle, it is possible to obtain
	a list of all VMs running under Windows. To do this, find out
	how many VMs are currently running with the appropriate API
	call. Then allocate enough memory to hold all of them (each
	handle takes up 4 bytes). Next, calculate the ABSOLUTE
	address of that memory (you will have to use the DPMI if this
	is being done from a Windows program). Put this value in the
	EBX register and call the API. When it returns, your table
	will be filled. The first entry in the table will be the
	System VM handle. Subsequent entries will be the handles of
	each VM as it was created in chronological order. 

The API functions do the following:
	Return version number
	Kill a VM
	Return the number of VMs currently active
	Return a list of all VM handles currently active

To run the example program (TSTVM.EXE), start Windows in Enhanced
mode. Next, open up two or three DOS sessions. Open up one more DOS
session and run TSTVM.EXE from it. If the VM you ran TSTVM.EXE from
was in a window, you will see the other DOS sessions dissapear from
the screen. You will also get two "error" messages from TSTVM.EXE
indicating that you tried to kill the System VM and the Current VM.
Don't worry, this is normal. TSTVM.EXE gets the handles of all VMs in
the system and then tries to kill them all. VVMD.386 will not let it
kill the System VM nor will it let a program kill its own VM (hey, if
you don't like it, change it - the code is all there for you to play
with 'till your heart's content).

If you have any questions or problems, please feel free to send me
BIXmail. My BIX ID is CHill.
	
