V86MMGR_Set_EMS_XMS_Limits

include v86mmgr.inc

mov     ebx, VMHandle
mov     eax, MinEMS
mov     edx, MaxEMS
mov     esi, MinXMS
mov     edi, MaxXMS
mov     ecx, Flags
VxDcall V86MMGR_Set_EMS_XMS_Limits
jc      error_handler
 

Sets the EMS and XMS memory limits for a VM. A VxD should only call this service when processing the Create_VM control message. Uses Flags.

This service must be made during the Create_VM message for it to work properly. This service should not be called on the system virtual machine. Uses Flags.

VMHandle
Handle of the VM to set limits for. Cannot be the system VM.
MinEMS and MaxEMS
Minimum and maximum EMS limits for the VM, in kilobytes. Specify zero for both values to disable EMS memory; specify -1 to leave the current EMS limits unchanged.
MinXMS and MaxXMS
Minimum and maximum XMS limits for the VM, in kilobytes. The XMS limits do not include the high memory area (HMA). Specify zero for both values to disable XMS memory; specify -1 to leave the current XMS limits unchanged.
Flags
Flags. Can be zero or more of these values.
EMS_XMS_Limit_DisableHMA (bit number EMS_XMS_Limit_DisableHMABit) Disables access to the the HMA.
EMS_XMS_Limit_EnableHMA (bit number EMS_XMS_Limit_EnableHMABit) Enables access to the HMA.
EMS_XMS_Limit_XMS_Is_Locked (bit number EMS_XMS_Limit_XMS_Is_LockedBit) Lock XMS memory
EMS_XMS_Limit_EMS_Is_Locked (bit number EMS_XMS_Limit_EMS_Is_LockedBit) Lock EMS memory.

If neither EMS_XMS_Limit_DisableHMA nor EMS_XMS_Limit_EnableHMA is specified, the HMA state (enabled or disabled) is not changed.

The service fails if there is insufficient memory for the minimum allocation request. In this case, the service uses the GetSetDetailedVMError service to set error values. Some of the limits may have been set; use the V86MMGR_Get_EMS_XMS_Limits service to determine the new settings.