This is part of Win16 API which allow to create versions of program from one source code to run under OS/2 and Win16. Under OS/2 program can be running under Win-OS/2 if program is Windows NE executable, and with help on Windows Libraries for OS/2, if it is OS/2 NE executable. Here is a WLO to OS/2 API mapping draft
The OldExitWindows function immediately terminates the entire Windows session by directly invoking the DOS “terminate program” interrupt (INT 21h, Function 4Ch), which kills the system virtual machine. It is an undocumented function exported by USER.EXE at ordinal 2 and represents a hard‑exit mechanism left over from Windows 2.1 for compatibility reasons.
void FAR PASCAL OldExitWindows(void);
This function takes no parameters.
This function does not return. Control is passed directly to MS‑DOS, and the Windows environment is forcibly terminated.
#include <windows.h> int PASCAL WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { // Optional confirmation dialog before the hard exit. int result = MessageBox(NULL, "This will immediately exit Windows without saving. Continue?", "OldExitWindows Demo", MB_YESNO | MB_ICONWARNING); if (result == IDYES) { // Perform an unconditional, immediate exit to DOS. OldExitWindows(); } // If the user chose "No", the program continues normally. return 0; }
.MODEL LARGE .386 INCLUDE windows.inc .CODE START PROC FAR ; Call OldExitWindows – never returns call OldExitWindows START ENDP END START