delphi5中有fileopen和fileseek,不知道你为什么说没有。他们在Sysutils。
你可以看帮助。

解决方案 »

  1.   

    哦,是有fileopen,fileseek,fileread什么的,
    可是我在以前的帖子上看大家讨论的时候都说fseek,fopen什么的,
    是不是fileseek,fileopen的简写?
    不过我的fileread还是不会用,
    读到buffer:pchar;里的数据不能放到s:string;里,也不能用label.caption 或 edit.text
    显示出来。
    我用循环,s:=s+buffer[i];来逐个的往s里写每一个字符,就不行,报错,什么
    Access violation at address004414CB in module'Project1.exe'.Read of address 69676A70
    :~(
      

  2.   

    fseek,fopen 好像是c or C++的。
    至于buffer 可以这样定义
    var
    myBuffer:array[1..1024]of char
    or
    mybuffer:array[0..10000]of byte
      

  3.   

    好像buffer不能定义成指针或动态树组。定义成定长的数组是可以的。你看一下下面的代码:procedure TForm1.Button1Click(Sender: TObject);
    var
      iFileHandle: Integer;
      iBytesRead: Integer;
      Buffer:Array[0..1000] of char;
    begin
      if OpenDialog1.Execute then
      begin
          iFileHandle := FileOpen(OpenDialog1.FileName, fmOpenRead);
          iBytesRead := FileRead(iFileHandle, Buffer, 1000);
          FileClose(iFileHandle);      Memo1.Lines.Add(Buffer);
      end;
    end;
      

  4.   

    噢耶,GREAT!行了,谢谢,谢谢:)