Visual C++(r) version 2.0 and Problems with the Default Code Segment

Windows 95 drivers built by using Visual C++ version 2.0 may have problems with page faults under stress. By default Visual C++ version 2.0 places all code in the .text code segment which is Win32 pageable code. (Previous versions of the compiler placed code in the locked _LTEXT segment by default.) If the ISR, DPC, or other code is pageable and this code gets swapped under heavy stress, calls to these routines are lost. To lock down code that is not pageable, you can place a single pragma "LCODE" line in front of all .C files that do not already have a pragma "PCODE" or pragma "ICODE" in place. Always check the .map file for the driver to make sure the .text segment does not contain code that should be locked.