|
|
|
|
|
|
|
|
|
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.
|
|
|
MapFileAndCheckSumA
The MapFileAndCheckSumA function computes the checksum of an image file.
ULONG MapFileAndCheckSumA(
IN LPSTR Filename,
|
| OUT LPDWORD HeaderSum,
|
| OUT LPDWORD CheckSum
|
| );
|
|
Parameters
Filename
The filename of the file for which the checksum is to be computed.
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 CHECKSUM_SUCCESS.
If the function fails, then the return value is one of the following:
Value
| Meaning
| CHECKSUM_OPEN_FAILURE
| Could not open the file.
| CHECKSUM_MAP_FAILURE
| Could not create the file mapping for the file.
| CHECKSUM_MAPVIEW_FAILURE
| Could not map a view of the file.
| CHECKSUM_UNICODE_FAILURE
| Could not convert the filename to UNICODE.
|
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. It is recommended that
all images have valid checksums.
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder
More Online Helps
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|