V86MMGR_Load_Client_Ptr


include v86mmgr.inc

mov     ebx, VMHandle
mov     ebp, OFFSET32 ClientRegisters
mov     ah, IdSegmentReg
mov     al, IdOffsetReg
VxDcall V86MMGR_Load_Client_Ptr

Loads the FS:ESI register pair with the far pointer in the specified client registers. Uses ESI, Flags, FS.

VMHandle

Handle of the current VM. The VM must be in protected mode.

ClientRegisters

Address of a Client_Reg_Struc structure containing the register values of the current VM.

IdSegmentReg and IdOffsetReg

Values identifying the client's segment register and offset register. These values refer to Client_Reg_Struc structure fields. For example, to load the pointer in the virtual machine's DS:(E)DX register pair:


mov     ax, (Client_DS * 100h) + Client_DX
VxDcall V86MMGR_Load_Client_Ptr

If the virtual machine is running a 16-bit protected-mode application, the high word of the offset in ESI is set to zero. Otherwise, if the virtual machine is running a 32-bit program or is in VxD_Exec_Mode, the high word of ESI is not set to zero. This allows most translation procedures to operate correctly without the need to test the execution mode of the current virtual machine.