include vmm.inc
mov edx, RefData ; reference data (any doubleword)
mov esi, OFFSET32 Callback ; callback function to call
VMMCall Allocate_V86_Call_Back
jc error
mov [CallbackAddr], eax ; segment:offset for callback
Registers a callback function that V86 mode applications can call. Virtual devices use this service to provide an interface that is available to software in a VM. Uses EAX, Flags.
The system calls the callback procedure as follows:
mov ebx, VM ; current VM handle
mov edi, hCurThread ; current thread handle
mov edx, RefData ; reference data
mov ebp, OFFSET32 crs ; points to Client_Reg_Struc
call [Callback]
The VM parameter is a handle identifying the current virtual machine. The RefData parameter is the value supplied when the callback procedure was installed, and crs points to a Client_Reg_Struc structure containing the register values for the virtual machine.
Allocate_PM_Call_Back