Virtual Devices (3.1) (vdag31qh.hlp) (Table of Contents; Topic list)
VDD_Get_Mem
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
include vdd.inc
 
VxDcall VDD_Get_Mem
 
The VDD_Get_Mem service returns the flat address and allocation bitmap for
the specified virtual machine's video memory. This service returns the main
video-save memory and boosts the scheduling priority of the system virtual
machine.
 
Parameter   Description
────────────────────────────────────────────────────────────────────────────
 
EDX         Specifies the system virtual machine handle.
 
EBX         Specifies the handle of the virtual machine to retrieve the
            memory for.
 
EDI         Specifies the VDD control block pointer.
 
EBP         Points to the Client_Reg_Struc structure for the virtual
            machine.
 
Client_EBX  Specifies the virtual machine handle.
 
Client_ES   Specifies the selector identifying the segment containing the
            buffer to receive the VDA_Mem_State.
 
Client_EDI  Specifies the address of the buffer to receive the
            VDA_Mem_State.
 
Client_CX   Specifies the size of the buffer to hold the VDA_Mem_State. This
            is for debugging only.
 
Return Value
 
The Client_CX register contains the number of bytes copied to the buffer.
Otherwise, it is zero to indicate an error such as the buffer is too small
or an invalid selector.
 
Comments
 
To prevent memory from changing between calls to the VDD_Get_Mem and
VDD_Free_Mem services, this service boosts the system virtual machine's
priority using the Low_Priority_Device_Boost value. This inhibits normal
scheduling but does not hamper scheduling of virtual machine's to handle
events such as interrupts.
 
The allocation of memory to the bitmap is dynamic. The grabber must call
this service each time it accesses the memory.
 
A call to the VDD_Get_Mem service must be followed by a call to the
VDD_Free_Mem service as soon as possible. No other virtual machine will be
scheduled until the call to VDD_Free_Mem is made.
 
Uses
 
Flags
 
                                      ♦