|
FastCRC Library |
API |
|
SL_FCRC16_CalculateFile
int SL_FCRCCALL SL_FCRC16_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_FCRC16_CalculateFile( &checksum, filename ) == 0 )
{
/*****Use the checksum**************************************/
/*...*/
}
return 0;
}
|
|
CRC16 API Overview
| CRC16 API Functions
|
Useful Links | HashCalc
See Also
SL_FCRC16_Calculate,
SL_FCRC16_CalculateStr,
SL_FCRC_ConvertToHex16
|