function HexToInt(const HexStr: string): longint;
var
iNdx: integer;
cTmp: Char;
begin
Result := 0;
for iNdx := 1 to Length(HexStr) do begin
cTmp := HexStr[iNdx];
case cTmp of
'0'..'9': Result := 16 * Result + (Ord(cTmp) - $30);
'A'..'F': Result := 16 * Result + (Ord(cTmp) - $37);
'a'..'f': Result := 16 * Result + (Ord(cTmp) - $57);
else
raise EConvertError.Create('Geçersiz karakter');
end;
end;
end;