Hook_Device_V86_API

include vmm.inc

mov     eax, ID                 ; device ID
mov     esi, OFFSET32 Callback  ; points to new API callback
VMMCall Hook_Device_V86_API
 

Installs an API callback procedure allowing a virtual device to intercept calls to the V86 mode API of another virtual device. This service is intended to support virtual devices that need to monitor calls to the APIs of other virtual devices. Most virtual devices will never need this service. Uses ESI, Flags.

ID
Identifier of the virtual device to monitor.
Callback
Address of the callback procedure to install. For more information about the callback procedure, see below.

The system calls the callback procedure whenever an application in a virtual machine calls the API for the specified virtual machine. The system calls the callback as follows:

mov     ebx, VM             ; current VM handle
mov     ebp, OFFSET32 crs   ; points to Client_Reg_Struc
call    [Callback]
 

The VM parameter is a handle identifying the current virtual machine and the crs parameter points to a Client_Reg_Struc structure containing the register values of the current virtual machine. Other registers contain the parameter values intended for the API.

The callback procedure can carry out tasks but eventually must pass execution to the previous API callback procedure, preserving the EBX and EBP registers when it calls.

See Also

Hook_Device_PM_API