UnmanagedMemoryAccessor.Initialize(SafeBuffer, Int64, Int64, FileAccess) UnmanagedMemoryAccessor.Initialize(SafeBuffer, Int64, Int64, FileAccess) UnmanagedMemoryAccessor.Initialize(SafeBuffer, Int64, Int64, FileAccess) UnmanagedMemoryAccessor.Initialize(SafeBuffer, Int64, Int64, FileAccess) Method

Definition

Sets the initial values for the accessor.

protected:
 void Initialize(System::Runtime::InteropServices::SafeBuffer ^ buffer, long offset, long capacity, System::IO::FileAccess access);
protected void Initialize (System.Runtime.InteropServices.SafeBuffer buffer, long offset, long capacity, System.IO.FileAccess access);
member this.Initialize : System.Runtime.InteropServices.SafeBuffer * int64 * int64 * System.IO.FileAccess -> unit
Protected Sub Initialize (buffer As SafeBuffer, offset As Long, capacity As Long, access As FileAccess)

Parameters

buffer
SafeBuffer SafeBuffer SafeBuffer SafeBuffer

The buffer to contain the accessor.

offset
Int64 Int64 Int64 Int64

The byte at which to start the accessor.

capacity
Int64 Int64 Int64 Int64

The size, in bytes, of memory to allocate.

access
FileAccess FileAccess FileAccess FileAccess

The type of access allowed to the memory. The default is ReadWrite.

Exceptions

offset plus capacity is greater than buffer.

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.

Remarks

This method is called by the constructors for this class.

Security

SecurityPermission
for access to unmanaged code. Associated enumeration: UnmanagedCode.

Applies to