Delphi DLL
Delphi DLL
Compute CRC32 of a File
Calculates the CRC32 of a file's contents and returns the 32-bit CRC as a hex string.Chilkat Delphi DLL Downloads
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, ZipCrc;
...
procedure TForm1.Button1Click(Sender: TObject);
var
zipCrc: HCkZipCrc;
crc: Integer;
hexStr: PWideChar;
begin
zipCrc := CkZipCrc_Create();
// Use a relative for absolute path to the file..
crc := CkZipCrc_FileCrc(zipCrc,'qa_data/hamlet.xml');
hexStr := CkZipCrc__toHex(zipCrc,crc);
Memo1.Lines.Add(hexStr);
CkZipCrc_Dispose(zipCrc);
end;