FastCRC Library API


int SL_FCRCCALL SL_FCRC32_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_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



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