Вниз
Скачать: CL | DM;

Ошибка в пр-ме: ...File access denied...   Найти похожие ветки 

 
hawkins   (2004-09-21 16:06) [0]

Добрый день! Помогите решить проблему, может кто сталкивался  
с такой ошибкой. При запуске программы
вызывается исключение, текст такой:
 "... raised exception class EinOutError with message "File access denied".
Текст программы :

program MyProgramm;
uses
 Forms,Windows,SysUtils,
 Unit2 in "Unit2.pas" {Form2},
  ...
var
   F:TextFile;
  WDir:array [0..255] of char;
  FDir:string;
begin
   GetWindowsDirectory(WDir,255);
    FDir:=WDir+"\filename.txt";
    AssignFile(F,WDir);

    if not FileExists(FDir) then
      begin
       ReWrite(F);  //---- здесь ошибка-----
       CloseFile(F);
      end
     else  begin
       ...
      end;

   Application.Initialize;  
   Application.CreateForm(TForm2, Form2);
   Application.Run;
   end;

end.


 
TUser ©   (2004-09-21 16:07) [1]

FDir:=WDir+"\filename.txt";
   AssignFile(F,FDir);

   if not FileExists(FDir) then
     begin


 
TUser ©   (2004-09-21 16:08) [2]

FDir:=WDir+"\filename.txt";
   AssignFile(F,FDir);

   if not FileExists(FDir) then
     begin

+ ExcludeTrailingBackslsh для уверенности



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.021 c
1-1096300351
fuzzy
2004-09-27 19:52
2004.10.10
Помогите с TMemo


3-1094706081
HanIP
2004-09-09 09:01
2004.10.10
Выполенние Guage


3-1094789320
Mefodiy
2004-09-10 08:08
2004.10.10
Использование UCASE в SQL запросе


4-1094461814
Паскаль
2004-09-06 13:10
2004.10.10
button1.enabled:=sendmessage(...,em_canudo,0,0) выдает ошибку!


3-1094748738
Vigo
2004-09-09 20:52
2004.10.10
Вопрос по работе с таблицами БД через TClientDataSet




   Наверх