V86MMGR_Get_VM_Flat_Sel

include v86mmgr.inc

mov     ebx, VMHandle
VxDcall V86MMGR_Get_VM_Flat_Sel
mov     [Selector], eax
 

Gets a selector that points to the base of the virtual 8086-mode address space of the specified VM. Uses EAX, Flags.

VMHandle
Handle of a VM.

This is useful for 32-bit applications since this selector can be used to point to any address in the virtual machine's V86 address space. The selector is writable, and has a limit of 11000h bytes so that the high memory area is also addressable.

The selector returned is in the specified virtual machine's LDT. Therefore, the selector is only valid to use when the virtual machine is running (is the current virtual machine).