仅供参考
{十六进值字符串转换成LongInt值}
function HexStrToInt(S: String): LongInt;
var
I: Integer;
begin
Result := 0;
for I := 1 to Length(S) do
begin
if S in ['0'..'9'] then
Result := Result * 16 + (Integer(S) - 48)
else if S in ['A'..'F'] then
Result := Result * 16 + (Ord(S) - 55);
end;
end;