MemoryMappedFileStatic: CreateNew |
Creates a memory-mapped file that has the specified capacity and access type in system memory.
Public Function CreateNew( ByRef MapName As String, ByVal Capacity As Currency, Optional ByVal Access As MemoryMappedFileAccess = MemoryMappedFileAccess. ReadWrite ) As MemoryMappedFile
Default: MemoryMappedFileAccess . ReadWrite
Use this method to create a memory-mapped file that is not persisted (that is, not associated with a file on disk), which you can use to share data between processes.
Exception | Condition |
---|---|
ArgumentException |
MapName is an empty string. -or- Access is set to write-only with the WriteOnly enumeration value. |
Capacity is less than or equal to zero. -or- Access is not a valid MemoryMappedFileAccess enumeration value. |