Browse Source

Windows: Ensure that memory mapped files behave the same on all targets by allowing other code to open the memory mapped file with write priveleges even if the map was created with read priveleges only

tags/2021-05-28
hogliux 8 years ago
parent
commit
b83bf4e7ce
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      modules/juce_core/native/juce_win32_Files.cpp

+ 1
- 1
modules/juce_core/native/juce_win32_Files.cpp View File

@@ -360,7 +360,7 @@ void MemoryMappedFile::openInternal (const File& file, AccessMode mode, bool exc
}
HANDLE h = CreateFile (file.getFullPathName().toWideCharPointer(), accessMode,
exclusive ? 0 : (FILE_SHARE_READ | (mode == readWrite ? FILE_SHARE_WRITE : 0)), 0,
exclusive ? 0 : FILE_SHARE_WRITE, 0,
createType, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, 0);
if (h != INVALID_HANDLE_VALUE)


Loading…
Cancel
Save