Вниз
Скачать: 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.022 c
14-1095594345
DelphiStarter_Irbis1001
2004-09-19 15:45
2004.10.10
TSplitter


14-1095843783
miwa
2004-09-22 13:03
2004.10.10
Подскажите, что это за песня? Лет пять назад, вроде, была


4-1094544612
SS
2004-09-07 12:10
2004.10.10
Работа с процессами


3-1095184734
Вано
2004-09-14 21:58
2004.10.10
Проверка структуры таблицы


3-1095263457
Surrender
2004-09-15 19:50
2004.10.10
DateTime в формате String в базе Access




   Наверх