Windows 3.1 Device Drivers (ddag31qh.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.
Interrupt 2Fh Function 1683h
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
mov     ax, 1683h   ; Get Current Virtual Machine ID
int     2Fh         ; multiplex interrupt
 
Get Current Virtual Machine ID (Interrupt 2Fh Function 1683h) returns the
identifier for the current virtual machine. MS-DOS device drivers, TSRs, and
other programs use this function to determine which virtual machine is
running. This is especially important for programs that independently manage
separate data or execution contexts for separate virtual machines.
 
Return Value
 
The return value is the current virtual-machine identifier in the BX
register.
 
Comments
 
Each virtual machine has a unique, nonzero identifier. Although Windows
currently runs in virtual machine 1, programs should not rely on this.
Windows assigns the identifier when it creates the virtual machine, and
releases the identifier when it destroys the virtual machine. Since Windows
may reuse identifiers from previous destroyed virtual machines, programs
should monitor changes to virtual machines to ensure no mismatches.
 
                                      ♦