CRC.h 1001 B

1234567891011121314151617181920212223
  1. /***************************************************************************
  2. Function: MemoryCRC()
  3. Parameters: data: pointer to data
  4. size: size of the data (must be non-zero)
  5. Purpose: generate a 32-bit checksum
  6. Returns: checksum of the data (never returns zero)
  7. ****************************************************************************/
  8. int MemoryCRC(const void *_data, unsigned size);
  9. /***************************************************************************
  10. Function: FileCRC()
  11. Parameters: szFileName: file to get CRC from
  12. szErrorMsg: this can be NULL if you don't care about a msg,
  13. or else it must be able to store 100+MAX_PATH chars
  14. Returns: Checksum of the file, returns 0 on error
  15. Example: CRC = FileCRC("autoexec.bat", 0, 0);
  16. ****************************************************************************/
  17. int FileCRC(const char *szFilename, char * szErrorMsg);
  18. int FileCRC(HANDLE hFile, char * szErrorMsg);