Вниз
Скачать: 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
1-1096159405
Leaner
2004-09-26 04:43
2004.10.10
Ошибка: C0000008 в строке CloseHandle(FHand);


1-1095915518
kukuikar
2004-09-23 08:58
2004.10.10
MD5: похоже на правду?


1-1096127610
Fagot
2004-09-25 19:53
2004.10.10
REG_BINARY


8-1089990457
Serg_lys
2004-07-16 19:07
2004.10.10
ToolButton и Image


14-1095543110
GanibalLector
2004-09-19 01:31
2004.10.10
база примаков




   Наверх