Selaa lähdekoodia

* introduced fmShareDenyNoneFlags on windows because the meaning of fmShareDenyNone is unclear, see also #8898

git-svn-id: trunk@13514 -
florian 16 vuotta sitten
vanhempi
commit
d34061d7e4
2 muutettua tiedostoa jossa 9 lisäystä ja 2 poistoa
  1. 3 2
      rtl/win/sysfile.inc
  2. 6 0
      rtl/win/sysutils.pp

+ 3 - 2
rtl/win/sysfile.inc

@@ -198,8 +198,9 @@ procedure do_open(var f;p:pchar;flags:longint);
   when (flags and $10000) there is no check for close (needed for textfiles)
 }
 Const
-  file_Share_Read  = $00000001;
-  file_Share_Write = $00000002;
+  file_Share_Read   = $00000001;
+  file_Share_Write  = $00000002;
+  file_Share_Delete = $00000004;
 Var
   shflags,
   oflags,cd : longint;

+ 6 - 0
rtl/win/sysutils.pp

@@ -48,6 +48,12 @@ Var
   Win32MinorVersion,
   Win32BuildNumber   : dword;
   Win32CSDVersion    : ShortString;   // CSD record is 128 bytes only?
+Const
+  { it can be discussed whether fmShareDenyNone means read and write or read, write and delete, see 
+    also http://bugs.freepascal.org/view.php?id=8898, this allows users to configure the used
+	value
+  }
+  fmShareDenyNoneFlags : DWord = 3;  
 
 { Compatibility with Delphi }
 function Win32Check(res:boolean):boolean;inline;