Microsoft KB Archive/26434

New -e Switch for the Resource Compiler and EMS

PSS ID Number: Q26434 Article last modified on 11-05-1993

2.03 2.10 3.00 MS-DOS

= QUESION =

What does -e on the RC line do specifically?

= RESPONSE =

The -e switch was designed as a way for smart printer drivers to get around an efficiency routine that we put in. By default, all libraries that call GlobalAlloc get memory from above the EMS line EXCEPT libraries that are loaded through LoadLibrary (the majority of libraries loaded this way are printer drivers). Libraries that are loaded by LoadLibrary get non-banked memory by default. The -e switch changes the default situation for these LoadLibrary-loaded modules so that by default they get memory from above the EMS line. Please note the following examples: 1. EPSON.DRV does a simple GlobalAlloc. It was compiled without the -e switch. It is loaded via LoadLibrary. Therefore, GlobalAlloc returns memory from below the line. 2. HPPCL.DRV was compiled with the -e switch. When it does a GlobalAlloc, it gets memory from above the line even though it was loaded through LoadLibrary. It can get below-the-line memory with the GMEM_NOT_BANKED switch. 3. WIN87EM.EXE is not loaded through LoadLibrary. Instead, it is loaded whenever a task requests it. Therefore, if it does a normal GlobalAlloc, it gets above-the-line memory.

Additional reference words: 3.00 KBCategory: KBSubcategory: TlsRcMisc Copyright Microsoft Corporation 1993.