Virtual Devices (3.1) (vdag31qh.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
_Allocate_Device_CB_Area
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
include vmm.inc
 
VMMcall _Allocate_Device_CB_Area, <nBytes, flags>
 
or      eax, eax        ; zero if error
jz      not_allocated
 
mov     [Offset], eax   ; offset from start of control block to new area
 
The _Allocate_Device_CB_Area service allocates an area in the control block
of the current virtual machine for exclusive use by the virtual device.
Virtual devices typically uses this service to allocate space to store data
that is specific to a given virtual machine.
 
This service is only available during initialization.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
nBytes     Specifies the number of bytes to allocate.
 
flags      Specifies the operation flags. This parameter must be set to 0.
 
Return Value
 
The EAX register contains the offset from the start of the control block to
the new area if the service is successful. Otherwise, EAX contains zero to
indicate an error such as insufficient memory to satisfy the request.
 
Comments
 
If this service returns an error, the virtual device should consider this a
fatal error and respond accordingly.
 
Although this service aligns the new area on a doubleword boundary and
rounds the nBytes parameter up to the next multiple of 4, the virtual device
must not rely on this behavior.
 
The service fills the newly allocated area with zeros. When the system
creates a new virtual machine, it fills all bytes of the control block with
zeros.
 
Uses
 
EAX
 
See Also
 
Control_Block