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
Allocates an area in the control block of all virtual machines 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. Unlike Windows 3.1 which restricted this service to initialization, Windows 95 supports this service after initialization. Uses EAX, ECX, EDX, and Flags.
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.
_Deallocate_Device_CB_Area