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_System_Exit_Code
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
include vmm.inc
 
mov     al, ExitCode        ; exit code to set
VMMcall Set_System_Exit_Code
 
The Set_System_Exit_Code service sets the exit code value that Windows
returns to MS-DOS when Windows terminates. The system copies this value to
the AL register when it executes the MS-DOS End Program function (Interrupt
21h Function 4Ch).
 
This service is intended for the exclusive use of the virtual shell device.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
ExitCode   Specifies the exit code value.
 
Return Value
 
This service has no return value.
 
Comments
 
This exit code is associated only with the exit of the system not the system
virtual machine.
 
In the case of an abnormal termination the system may set its own exit code
value and ignore the value set by this service.
 
Uses
 
EDX, Flags
 
                                      ♦