_DOSMGR_Exec_VM


include dosmgr.inc
 
VxDcall _DOSMGR_Exec_VM <VMHandle, V86Size, CallBack, RefData>

Schedules the execution specified by a previous call to the _DOSMGR_Set_Exec_VM_Data service, and sets other parameters of the execution.

VMHandle

Handle of the current virtual machine.

V86Size

Size in pages of the virtual machine. This service does not map these pages; the value is simply used to set the MS-DOS size of the virtual machine.

CallBack

Callback procedure to call when the virtual machine terminates. If this parameter is zero, no callback is called.

RefData

Reference data to pass to the callback procedure.

The system calls the callback when the virtual machine terminates. The callback receives the following input parameters:

EBP

points to a Client_Reg_Struc

EBX

virtual machine handle

EDX

points to reference data


The callback must preserve the EBX, EBP, and segment registers. After the callback returns, the system carries out the normal virtual machine termination sequence. At this time, the virtual machine is still in a running state. The callback can delay termination by delaying its return. However, the callback must simulate interrupts into the virtual machine to keep the scheduler moving if it is holding termination.