mov ax, 1602h; Get Enhanced-Mode Windows Entry Point
int 2Fh ; multiplex interrupt
mov word ptr [WinAddr], di
mov word ptr [WinAddr+2], es ; es:di contains entry-point address
Get Enhanced-Mode Windows Entry Point (Interrupt 2Fh Function 1602h) returns the address of the 386 enhanced-mode Windows entry-point procedure. Applications can call this procedure to direct Windows/386 version 2.x to carry out specific actions.
This function applies to Windows/386 version 2.x only. It is provided under Windows version 3.x for compatibility reasons.
This function has no parameters.
The return value contains the Windows entry-point address in the ES:DI registers.
Although the Windows entry-point address is the same for every virtual machine, an application can call this function any number of times.
To direct Windows to carry out a specific action, the application sets the AX register to 0000h. This function retrieves the current VM identifier and copies the identifier to the BX register.
Additionally, the application must place a return address in the ES:DI register pair and use the jmp instruction to transfer control to the Windows entry point.
The following example shows how to obtain the current VM identifier:
mov di, cs
mov es, di
mov di, OFFSET Win_Return
xor ax, ax ; Get Current VM Identifier
jmp [WinAddr]
Win_Return:
mov [VM_Id], bx ; bx contains the current VM identifier
Interrupt 2Fh Function 1683h Get Current Virtual Machine ID