function HexToInt1(const S: String): DWORD;
var
I : Integer;
begin
Result := 0;
for I := 1 to Length(s) do
begin
case s of
'0'..'9': Result := Result * 16 + Ord(S) - Ord('0');
'A'..'F': Result := Result * 16 + Ord(S) - Ord('A') + 10;
'a'..'f': Result := Result * 16 + Ord(S) - Ord('a') + 10;
else
Result := 0;
Exit;
end;
end
end;
http://www.delphibbs.com/delphibbs/dispq.asp?lid=2290273
网上的