UnmanagedMemoryAccessor.Initialize(SafeBuffer, Int64, Int64, FileAccess) メソッド
定義
アクセサーの初期値を設定します。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)
パラメーター
- 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. 既定値は、ReadWrite です。The default is ReadWrite.
例外
offset
に capacity
を加算した値が buffer
を超えています。offset
plus capacity
is greater than buffer
.
buffer
が null
です。buffer
is null
.
offset
または capacity
が 0 未満です。offset
or capacity
is less than zero.
- または --or-
access
が有効な MemoryMappedFileAccess 列挙値ではありません。access
is not a valid MemoryMappedFileAccess enumeration value.
offset
に capacity
を加算した値は、アドレス空間の最大値をラップします。offset
plus capacity
would wrap around the high end of the address space.
注釈
このメソッドは、このクラスのコンストラクターによって呼び出されます。This method is called by the constructors for this class.