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.
Hook_Device_PM_API
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
include vmm.inc
 
mov     eax, ID                 ; device ID
mov     esi, OFFSET32 Callback  ; points to new API callback
VMMcall Hook_Device_PM_API
 
The Hook_Device_PM_API service installs an API callback procedure allowing a
virtual device to intercept calls to the protected-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.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
ID         Specifies the identifier for the virtual device to monitor.
 
Handler    Points to the callback proecdure to install. See the Comments
           section for more information about the procedure.
 
Return Value
 
The carry flag is clear and the ESI register contains the address of the
previous callback procedure if the service is successful. Otherwise, the
carry flag is set to indicate the specified virtual device does not support
an API.
 
Comments
 
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
crs points to a Client_Reg_Struc structure containing the regsiter 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.
 
Uses
 
ESI, Flags
 
See Also
 
Hook_Device_V86_API