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.
Set_Device_Focus
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
include vmm.inc
 
mov     ebx, VM         ; VM handle
mov     edx, VID        ; ID of virtual device to receive focus
mov     esi, Flags      ; flags for device-critical focus
mov     edi, AssocVM    ; handle of associated VM
mov     eax, Set_Device_Focus
VMMcall System_Control
 
The Set_Device_Focus message sets the focus of the specified virtual device
to the specified virtual machine.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
VM         Specifies a handle identifying the virtual machine.
 
VID        Specifies the identifier for the virtual device to receive the
           focus. If this parameter is zero, all virtual devices receive the
           focus.
 
Flags      Specifies how to set the focus if the VID parameter is zero. This
           parameter can have the following value:
 
           Value  Meaning
           ─────────────────────────────────────────────────────────────────
           1      Used by the virtual shell device to determine which
                  virtual machine to set focus for. If this value is given,
                  the AssocVM parameter may specify a virtual machine.
 
           All other values are reserved.
 
AssocVM    Specifies a handle identifying a virtual machine associated with
           a problem. This parameter is zero if there is no such virtual
           machine. This parameter is used only if the Flags parameter is
           set to 1.
 
Return Value
 
The carry flag must be clear.
 
Comments
 
A virtual device that receives the focus should take steps, such as
disabling I/O trapping, to allow the virtual machine to run as fast as
possible.
 
Uses
 
Flags
 
                                      ♦