|
FastCRC Library |
API |
|
SL_FCRC16C_CalculateFile
int SL_FCRCCALL SL_FCRC16C_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_FCRC16C_CalculateFile( &checksum, filename ) == 0 )
{
/*****Use the checksum**************************************/
/*...*/
}
return 0;
}
|
|
CRC16C API Overview
| CRC16C API Functions
|
Useful Links | HashCalc
See Also
SL_FCRC16C_Calculate,
SL_FCRC16C_CalculateStr,
SL_FCRC_ConvertToHex16
|