[Implemented] #PB_File_SharedWrite in ReadFile()
Posted: Fri Feb 01, 2013 9:56 am
According to the help, in PB 5.10, the function ReadFile() does not support #PB_File_SharedWrite. http://purebasic.developpez.com/documen ... dfile.html
In this case, is unable to open one and the same file for read/write and read-only.Requires such access is to the file, and to do this, the function ReadFile() should support #PB_File_SharedWrite.
In this case, is unable to open one and the same file for read/write and read-only.
Code: Select all
Debug OpenFile(2, "C:\Test.txt", #PB_File_SharedRead)
Debug ReadFile(0, "C:\Test.txt" , #PB_File_SharedRead|#PB_File_SharedWrite) ; #PB_File_SharedWrite not supported!
Code: Select all
; Read / Write.
Debug CreateFile_("C:\Test.txt", #GENERIC_READ|#GENERIC_WRITE, #FILE_SHARE_READ, 0, #OPEN_ALWAYS, #FILE_ATTRIBUTE_NORMAL, 0)
; Read only.
Debug CreateFile_("C:\Test.txt", #GENERIC_READ, #FILE_SHARE_READ|#FILE_SHARE_WRITE, 0, #OPEN_EXISTING, #FILE_ATTRIBUTE_NORMAL, 0)