_SetDescriptor

include vmm.inc

VMMCall _SetDescriptor, <Selector, VM, DescDWORD1, DescDWORD2, flags>

or      eax, eax        ; nonzero if set, zero if error
jz      not_set
 

Sets (changes) the descriptor associated with the given selector. Uses EAX, ECX, EDX, and Flags.

Selector
GDT or LDT selector to set.
VM
Handle of the virtual machine to which the specified LDT selector belongs. This parameter is ignored if the Selector parameter is a GDT selector.
DescDWORD1
High-order doubleword of the new segment descriptor. This parameter contains the high 16 bits of the base address, the high 4 bits of the limit, and the status and type bits.
DescDWORD2
Low-order doubleword of the new segment descriptor. This parameter contains the low 16 bits of the base address and limit.
flags
Operation flags. Must be 0.

This service ignores the high 16-bits of the Selector parameter; the 80386 CPU often sets these bits to random values when doubleword operations are performed on segment registers.

The service ignores the RPL bits of the selector.

See Also

_GetDescriptor