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.
Call_VM_Event
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
include vmm.inc
 
mov     ebx, VM                     ; VM handle
mov     esi, OFFSET32 EventCallback ; points to callback procedure
mov     edx, OFFSET32 RefData       ; points to reference data
VMMcall Call_VM_Event
 
mov     [Event], esi                ; event handle or zero if not scheduled
 
The Call_VM_Event service either calls the event callback procedure
immediately, or schedules an event for the specified virtual machine. This
service schedules the event if the virtual device is processing a hardware
interrupt that interrupted the VMM, or the current virtual machine is not
the specified virtual machine. In all other cases, the service calls the
callback procedure and returns without scheduling an event.
 
Parameter      Description
────────────────────────────────────────────────────────────────────────────
 
VM             Specifies a handle identifying the virtual machine to process
               the event.
 
EventCallback  Points to the callback procedure. See the Comments section
               for more information about the procedure.
 
RefData        Points to reference data to be passed to the event callback
               procedure.
 
Return Value
 
The ESI register is zero if the service calls the callback procedure.
Otherwise, the ESI register contains the event handle. The event handle can
be used in subsequent calls to the Cancel_VM_Event service to cancel the
event.
 
This is an asynchronous service.
 
Comments
 
Since the specified virtual machine must process the event, the system
carries out a task switch if necessary before calling the procedure. The
callback procedure can carry out any actions and use any VMM services. The
system calls the event callback procedure as follows:
 
mov     ebx, VM                 ; current VM handle
mov     edx, OFFSET32 RefData   ; points to reference data
mov     ebp, OFFSET32 crs       ; points to a Client_Reg_Struc
call    [EventCallback]
 
The VM parameter is a handle identifying the current virtual machine,
RefData points to reference data supplied by the virtual machine that
scheduled the event, and crs points to a Client_Reg_Struc structure
containing the contents of the virtual machine's registers.
 
The callback procedure can modify EAX, EBX, ECX, EDX, ESI, and EDI.
 
Uses
 
Flags
 
See Also
 
Cancel_VM_Event, Schedule_VM_Event