INF: EMS Calls Under Windows 3.1

ID Number: Q83008

3.10

WINDOWS

Summary:

When enhanced mode Windows is running, the WIN386 module answers all

extended memory specification (XMS) calls. The standard mode MS-DOS

Extender (DOSX) answers all calls only in protected mode.

The standard mode task swapper answers memory allocation calls to

arbitrate the use of extended memory between Windows and MS-DOS

applications, and to facilitate task swapping.

More Information:

Windows enhanced mode provides its own XMS services, without regard to

the XMS driver that was installed before Windows started up. The

amount of XMS memory available in an MS-DOS window under enhanced mode

is determined by the PIF (program information file) settings, and not

by the amount of memory actually available in the system. The enhanced

mode XMS driver returns failure for all XMS Lock Region calls, because

enhanced mode XMS uses virtual memory rather than physical memory.

In standard mode, the task swapper hooks the XMS driver, allowing it

to arbitrate XMS use between Windows and MS-DOS applications. Most XMS

calls are passed through to the original XMS driver. However, calls

that manage extended memory are affected by the PIF settings. Because

it hooks the XMS driver, the standard mode task swapper can use

extended memory allocated to Windows, but not currently in use, for

swapping. This feature is disabled if a "limulator"

[Lotus/Intel/Microsoft (LIM) standard expanded memory system driver]

is present.

The standard mode MS-DOS extender hooks XMS detection in protected

mode. The INT 2Fh call that retrieves the address of the XMS driver's

control function (AX=4310h) returns a protected mode address that an

application can call to perform XMS control functions. This is

intended for the use by application installation programs that must

determine the version number of an installed XMS driver. Applications

in the Windows environment are discouraged from making other XMS calls

in protected mode. In particular, attempting to lock XMS memory in

standard mode may result in a page fault or fatal system crash.

Additional reference words: 3.10 switcher