INF: Checksums for Windows Executable Image Files

ID Number: Q72471

3.00

WINDOWS

Summary:

When the debugging version of Windows is running in real mode, it

calculates the checksum of each code segment that is loaded or

unloaded. This calculation is performed to ensure that a code segment

is not modified by a "wild write" (storing data through an invalid

pointer).

An application can cause the debugging version of Windows to calculate

checksums on all segments present in the system by calling the

ValidateCodeSegments function.

ValidateCodeSegments can be overridden by adding an

EnableSegmentChecksum=0 line to the [kernel] segment of the WIN.INI

file. However, when Windows 3.0 is running in real mode with EMS

(expanded memory specification) memory, the kernel does not calculate

checksums.

Segment validation is performed only in real mode because applications

are prevented from writing into code segments in protected mode. Any

attempt to write into a code segment in protected mode causes an

unrecoverable application error (GP-fault), which provides immediate

notification of the programming error.

Additional reference words: 3.00