UnmanagedMemoryAccessor Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the UnmanagedMemoryAccessor class.
Overloads
UnmanagedMemoryAccessor() |
Initializes a new instance of the UnmanagedMemoryAccessor class. |
UnmanagedMemoryAccessor(SafeBuffer, Int64, Int64) |
Initializes a new instance of the UnmanagedMemoryAccessor class with a specified buffer, offset, and capacity. |
UnmanagedMemoryAccessor(SafeBuffer, Int64, Int64, FileAccess) |
Initializes a new instance of the UnmanagedMemoryAccessor class with a specified buffer, offset, capacity, and access right. |
UnmanagedMemoryAccessor()
- Source:
- UnmanagedMemoryAccessor.cs
- Source:
- UnmanagedMemoryAccessor.cs
- Source:
- UnmanagedMemoryAccessor.cs
Initializes a new instance of the UnmanagedMemoryAccessor class.
protected:
UnmanagedMemoryAccessor();
protected UnmanagedMemoryAccessor ();
Protected Sub New ()
Applies to
UnmanagedMemoryAccessor(SafeBuffer, Int64, Int64)
- Source:
- UnmanagedMemoryAccessor.cs
- Source:
- UnmanagedMemoryAccessor.cs
- Source:
- UnmanagedMemoryAccessor.cs
Initializes a new instance of the UnmanagedMemoryAccessor class with a specified buffer, offset, and capacity.
public:
UnmanagedMemoryAccessor(System::Runtime::InteropServices::SafeBuffer ^ buffer, long offset, long capacity);
public UnmanagedMemoryAccessor (System.Runtime.InteropServices.SafeBuffer buffer, long offset, long capacity);
new System.IO.UnmanagedMemoryAccessor : System.Runtime.InteropServices.SafeBuffer * int64 * int64 -> System.IO.UnmanagedMemoryAccessor
Public Sub New (buffer As SafeBuffer, offset As Long, capacity As Long)
Parameters
- buffer
- SafeBuffer
The buffer to contain the accessor.
- offset
- Int64
The byte at which to start the accessor.
- capacity
- Int64
The size, in bytes, of memory to allocate.
Exceptions
offset
plus capacity
is greater than buffer
.
buffer
is null
.
offset
or capacity
is less than zero.
offset
plus capacity
would wrap around the high end of the address space.
Applies to
UnmanagedMemoryAccessor(SafeBuffer, Int64, Int64, FileAccess)
- Source:
- UnmanagedMemoryAccessor.cs
- Source:
- UnmanagedMemoryAccessor.cs
- Source:
- UnmanagedMemoryAccessor.cs
Initializes a new instance of the UnmanagedMemoryAccessor class with a specified buffer, offset, capacity, and access right.
public:
UnmanagedMemoryAccessor(System::Runtime::InteropServices::SafeBuffer ^ buffer, long offset, long capacity, System::IO::FileAccess access);
public UnmanagedMemoryAccessor (System.Runtime.InteropServices.SafeBuffer buffer, long offset, long capacity, System.IO.FileAccess access);
new System.IO.UnmanagedMemoryAccessor : System.Runtime.InteropServices.SafeBuffer * int64 * int64 * System.IO.FileAccess -> System.IO.UnmanagedMemoryAccessor
Public Sub New (buffer As SafeBuffer, offset As Long, capacity As Long, access As FileAccess)
Parameters
- buffer
- SafeBuffer
The buffer to contain the accessor.
- offset
- Int64
The byte at which to start the accessor.
- capacity
- Int64
The size, in bytes, of memory to allocate.
- access
- FileAccess
The type of access allowed to the memory. The default is ReadWrite.
Exceptions
offset
plus capacity
is greater than buffer
.
buffer
is null
.
offset
or capacity
is less than zero.
-or-
access
is not a valid MemoryMappedFileAccess enumeration value.
offset
plus capacity
would wrap around the high end of the address space.