例如:
var a:Tmemorystream;
...
a:=tmemorystream.create;
try
a.loadfromfile('c:\01.txt');
a.position:=0;运行到此时就会出现错误:
Project Project.exe raised exception class EFOpenError with message 'c:\01.txt'. Process stopped. Use Step or Run to continue.请诸位给个用TMemoryStream的LoadFromFile方法的例子。谢谢!

解决方案 »

  1.   

    01.txt文件存在么?
    load的时候还有没有其他进程访问他?
      

  2.   

    老大,刚才测试了,没有问题!var a:Tmemorystream;begin
      a:=tmemorystream.create;
      if OpenDialog1.Execute then
      a.LoadFromFile(OpenDialog1.FileName);
      a.Position:=0;
    end;
      

  3.   

    c:\01.txt
    肯定是存在的,我也感觉比较奇怪。
    我是将文件名倒进一个listbox中,再从listbox中提出文件名作为loadformfile()的参数的。检查了几遍,不应该有错呀
      

  4.   

    renzhm(戴尔飞) 
    你的回复虽然没能直接解决问题,但是提醒了我。谢谢!如何给分?