|
FastCRC Library |
API |
|
SL_FCRC32_CalculateFile
int SL_FCRCCALL SL_FCRC32_CalculateFile( unsigned
long* pCRC, const char* pFileName );
Return value
Zero if calculation is successful, otherwise nonzero.
Parameters
pCRC
[out] Pointer to the
variable that will receive the checksum.
pFileName
[in] Pointer to the
null-terminated string specifying the name of the file for which to calculate
the checksum.
Remarks
Calculates the checksum for the file pointed
by pFileName. The checksum is retrieved in the variable
pointed by pCRC.
Example
#include <FastCRC.h>
int main()
{
char filename[] = "C:\\Test.txt";
unsigned long checksum;
/*****Calculate the checksum************************************/
if( SL_FCRC32_CalculateFile( &checksum, filename ) == 0 )
{
/*****Use the checksum**************************************/
/*...*/
}
return 0;
}
|
|
CRC32 API Overview
| CRC32 API Functions
|
Useful Links | HashCalc
See Also
SL_FCRC32_Calculate,
SL_FCRC32_CalculateStr,
SL_FCRC_ConvertToHex32
|