_GetAppFlatDSAlias

include vmm.inc

VMMCall _GetAppFlatDSAlias

mov     [FlatData], eax         ; read-only GDT selector
 

Returns a ring-3, read-only, GDT selector that provides access to the same memory as the system's ring-0 data segment selector. Virtual devices use this service to support protected-mode APIs that let protected-mode applications read from the same memory as the virtual device. Uses EAX.

Since more than one virtual device may use this selector, a virtual device must never attempt to free the selector using the _Free_GDT_Selector service. Also, a virtual device should not attempt to create a read/write selector using this selector. If a virtual device requires an application to write to any portion of system memory, the virtual device should build its own selector with a base and limit that specifies just the memory the application must modify.

See Also

_Free_GDT_Selector