20.1.1 Windows Kernel

Windows applications should not use the MS-DOS memory management functions for DPMI. The Windows 3.0 and later kernel has two functions, GlobalDOSAlloc and GlobalDOSFree, that should be used by Windows applications and DLLs for allocating and freeing MS-DOS addressable memory.

Because the Windows kernel provides functions for allocating memory, manipulating descriptors, and locking memory, no DPMI functions other than the following are required for Windows applications:

Interrupt 21h function Description

0200h Get Real Mode Interrupt Vector
0201h Set Real Mode Interrupt Vector
0300h Simulate Real Mode Interrupt
0301h Call Real Mode Procedure with Far Return Frame
0302h Call Real Mode Procedure with Interrupt Return Frame
0303h Allocate Real Mode Callback Address
0304h Free Real Mode Callback Address

Non-Windows applications running in 386 enhanced mode can use all DPMI functions, because those functions are not restricted by the kernel.