{字符转化为十六进制数}
Function StrToAsc(StrString: String): String;
Var
i: integer;
tempstr: String;
Begin
result := '';
tempstr := Ansiuppercase(trim(strstring));
If tempstr = '' Then
exit;
For i := 1 To length(strstring) Do
result := result + inttohex(Ord(strstring), 2);
End;
试试看??