var s:string; len:Integer; AData:TBytes;begin s:=IntToHex(149259,6);//返回6位字符串 len := length(s) div 2; Setlength(AData,len); HextoBin(pchar(s),@AData[0],len);end;