FastCRC Library API


int SL_FCRCCALL SL_FCRC16_CalculateFile( unsigned long* pCRC, const char* pFileName );

Return value

Zero if calculation is successful, otherwise nonzero.



    [out] Pointer to the variable that will receive the checksum.


    [in] Pointer to the null-terminated string specifying the name of the file for which to calculate the checksum. 


Calculates the checksum for the file pointed by pFileName. The checksum is retrieved in the variable pointed by pCRC.


#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



Send Feedback to SlavaSoft Inc. Tell a friend about FastCRC Library