Export (0) Print
Expand All

MemoryMappedFile.OpenExisting Method (String, MemoryMappedFileRights)

Opens an existing memory-mapped file that has the specified name and access rights in system memory.

Namespace:  System.IO.MemoryMappedFiles
Assembly:  System.Core (in System.Core.dll)

static member OpenExisting : 
        mapName:string * 
        desiredAccessRights:MemoryMappedFileRights -> MemoryMappedFile

Parameters

mapName
Type: System.String

The name of the memory-mapped file to open.

desiredAccessRights
Type: System.IO.MemoryMappedFiles.MemoryMappedFileRights

One of the enumeration values that specifies the access rights to apply to the memory-mapped file.

Return Value

Type: System.IO.MemoryMappedFiles.MemoryMappedFile
A memory-mapped file that has the specified characteristics.

ExceptionCondition
ArgumentException

mapName is an empty string.

ArgumentNullException

mapName is a null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

desiredAccessRights is not a valid MemoryMappedFileRights enumeration value.

FileNotFoundException

The file specified for mapName does not exist.

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4
Show:
© 2015 Microsoft