Function ConvertStrToHex(Value : string):string;//把字符串转化为16进制数<br>var tempHex : string[2];<br> i : integer;<br>begin<br> Result := '';<br> if trim(Value) = '' then Exit;<br> tempHex := '';<br> for i := 1 to Length(Value) do<br> begin<br> tempHex := IntToHex(Ord(Value),2);<br> Result := Result + tempHex;<br> end;<br>end;<br>请参看我的笔记:http://www.delphibbs.com/keylife/iblog_show.asp?xid=4707