Quick Info

Windows NT
Yes
Win95
Yes
Win32s
No
Import Library
imagehlp.lib
Header File
imagehlp.h
Unicode
No
Platform Notes
Windows 95: IMAGEHLP is available as a redistributable.

CheckSumMappedFile

The CheckSumMappedFile function computes the checksum of an image file.

PIMAGE_NT_HEADERS CheckSumMappedFile(

IN LPVOID BaseAddress,

IN DWORD FileLength,

OUT LPDWORD HeaderSum,

OUT LPDWORD CheckSum

);

Parameters

BaseAddress

A pointer to the base of the mapped file. This value is obtained by calling the MapViewOfFile function.

FileLength

The length of the file, in bytes.

HeaderSum

A pointer to a variable that receives the original checksum from the image file, or zero if there is an error.

CheckSum

A pointer to the variable that receives the computed checksum.

Return Values

If the function succeeds, the return value is a pointer to the IMAGE_NT_HEADERS structure contained in the mapped image.

If the function fails, then the return value is NULL. To retrieve extended error information, call GetLastError.

Remarks

A new checksum for the file is computed and returned in the CheckSum parameter. This function is used by any application that creates or modifies an executable image. Checksums are required for Windows NT kernel mode drivers and some system DLLs. The Win32 linker computes the original checksum at link time, if the linker switch for checksumming is turned on.

The linker switch to enable the checksum calculation is /RELEASE. It is recommended that all images have valid checksums. It is the caller's responsibility to place the newly computed checksum into the mapped image and update the on-disk image of the file.

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database