Reset()缺省以Read/Write模式打开文件(FileMode=2);
Application.ExeName指定当前运行文件,不能进行write操作,所以出现了I/O error。AssignFile(f, Application.ExeName);
FileMode = 0;{Set file access to read only }
Reset(f);
...
CloseFile(f);
这样应该没有问题了。
Application.ExeName指定当前运行文件,不能进行write操作,所以出现了I/O error。AssignFile(f, Application.ExeName);
FileMode = 0;{Set file access to read only }
Reset(f);
...
CloseFile(f);
这样应该没有问题了。
你是想复制自己吧,像这样可能有问题