MemoryMappedFileStatic: OpenExisting

OpenExisting

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



 Public Function OpenExisting(
	  ByRef MapName As String,
	  Optional ByVal DesiredAccessRights As MemoryMappedFileRights = MemoryMappedFileRights. ReadWrite ) As MemoryMappedFile

Parameters

MapName
[ByRef] String. The name of the memory-mapped file to open.
DesiredAccessRights
[ByVal] Optional. MemoryMappedFileRights. One of the enumeration values that specifies the access rights to apply to the memory-mapped file.  

Default: MemoryMappedFileRights . ReadWrite

Return Values

MemoryMappedFile -  A memory-mapped file that has the specified name.

Remarks

The memory-mapped file can be either a persisted memory-mapped file (associated with a file on disk) or non persisted.

Exceptions

ExceptionCondition
ArgumentExceptionMapName is an empty string.
ArgumentNullExceptionMapName is vbNullString.
ArgumentOutOfRangeExceptionDesiredAccessRights is not a valid MemoryMappedFileRights enumeration value.
FileNotFoundExceptionThe file specified for MapName does not exist.

See Also

Project CorLib Overview

Class MemoryMappedFileStatic Overview