_OvrInitEms
Initializes expanded memory swapping for the overlay manager.
Defined in header <dos.h>
Syntax
#include <dos.h>
int cdecl far _OvrInitEms(unsigned emsHandle, unsigned firstPage,
unsigned pages);
Portability
| DOS | UNIX | Windows | ANSI C | C++ only |
|---|---|---|---|---|
| ■ |
Remarks
_OvrlnitEms checks for the presence of expanded memory by looking for an EMS driver and allocating memory from it. If emsHandle is zero, the overlay manager allocates EMS pages and uses them for swapping. If emsHandle is not zero, then it should be a valid EMS handle; the overlay manager will use it for swapping. In that case, you can specify firstPage, where the swapping can start inside that area.
In both cases, a nonzero pages parameter gives the limit of the usable pages by the overlay manager.
Return value
_OvrlnitEms returns 0 if the overlay manager is able to use expanded memory for swapping.
See also
_OvrInitExt_ovrbuffertinclude<dos.h>intmain{/*askoverlaymanagertocheckforexpandedmemoryallowittouse16pagesavailableonlyinmediumlargehugememorymodels*/_OvrInitEms;return0;
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Extraction notes
- heading `OvrlnitEms` read as `_OvrInitEms`
Stable link: /3.1/dos.h/_OvrInitEms/
· short form /3.1/_OvrInitEms/