Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ OpenExisting() [3/3]

static MemoryMappedFile System.IO.MemoryMappedFiles.MemoryMappedFile.OpenExisting ( string mapName,
MemoryMappedFileRights desiredAccessRights,
HandleInheritability inheritability )
inlinestatic

Definition at line 44 of file MemoryMappedFile.cs.

45 {
46 if (mapName == null)
47 {
48 throw new ArgumentNullException("mapName", System.SR.ArgumentNull_MapName);
49 }
50 if (mapName.Length == 0)
51 {
53 }
54 if (inheritability < HandleInheritability.None || inheritability > HandleInheritability.Inheritable)
55 {
56 throw new ArgumentOutOfRangeException("inheritability");
57 }
58 if (((uint)desiredAccessRights & 0xFEF0FFF0u) != 0)
59 {
60 throw new ArgumentOutOfRangeException("desiredAccessRights");
61 }
62 SafeMemoryMappedFileHandle handle = OpenCore(mapName, inheritability, desiredAccessRights, createOrOpen: false);
63 return new MemoryMappedFile(handle);
64 }
static SafeMemoryMappedFileHandle OpenCore(string mapName, HandleInheritability inheritability, MemoryMappedFileAccess access, bool createOrOpen)
MemoryMappedFile(SafeMemoryMappedFileHandle handle)
static string Argument_MapNameEmptyString
Definition SR.cs:38
static string ArgumentNull_MapName
Definition SR.cs:50
Definition SR.cs:7

References System.IO.MemoryMappedFiles.MemoryMappedFile.MemoryMappedFile(), System.SR.Argument_MapNameEmptyString, System.SR.ArgumentNull_MapName, System.handle, and System.IO.MemoryMappedFiles.MemoryMappedFile.OpenCore().