对应的二进制内容为:procedure TForm1.btn3Click(Sender: TObject);
var
  iFileHandle, iFileLength, iBytesRead : Integer;
  byteBuff : array of Byte;  byteBuffTemp : array of Byte;
  aLeng, sIndex : Integer;  i : Integer;
  str, stra, strb : string;
begin
  iFileHandle := FileOpen('C://myFile1.txt', fmOpenRead);
  iFileLength := FileSeek(iFileHandle, 0, 2);
  ShowMessage('iFileLength = ' + IntToStr(iFileLength));  FileSeek(iFileHandle, 0, 0);  SetLength(byteBuff, iFileLength);  iBytesRead := FileRead(iFileHandle, byteBuff[0], iFileLength);  FileClose(iFileHandle);
  
  sIndex := 0;
  str := '';
  aLeng := 5;
  SetLength(str, aLeng);
  Move(byteBuff[sIndex], str[1], aLeng);
  ShowMessage('str=' + str);  sIndex := aLeng;
  str := '';
  aLeng := 10;
  SetLength(str, aLeng);
  Move(byteBuff[sIndex], str[1], aLeng);
  ShowMessage('str=' + str);  sIndex := aLeng;
  str := '';
  aLeng := 1;
  SetLength(str, aLeng);
  Move(byteBuff[sIndex], str[1], aLeng);
  ShowMessage('str=' + str);  sIndex := aLeng;
  str := '';
  aLeng := 1;
  SetLength(str, aLeng);
  Move(byteBuff[sIndex], str[1], aLeng);
  ShowMessage('str=' + str);  str := '';
  for i:=0 to iBytesRead do
  begin
    str := str + chr(byteBuff[i]);
  end;  ShowMessage(str);  byteBuff := nil;
end;
现在问题是读取出来的最后两个字符不对
最后两个字符应该为:  ascii 29,  ascii 99希望能帮我找出问题谢谢了