UnmanagedMemoryStream.Initialize メソッド

定義

安全なバッファー内の UnmanagedMemoryStream クラスの新しいインスタンスを初期化するか、アンマネージ メモリの場所へのポインターを使用して初期化します。

オーバーロード

名前 説明
Initialize(Byte*, Int64, Int64, FileAccess)

アンマネージ メモリの場所へのポインターを使用して、 UnmanagedMemoryStream クラスの新しいインスタンスを初期化します。

Initialize(SafeBuffer, Int64, Int64, FileAccess)

指定したオフセット、長さ、およびファイル アクセスを使用して、安全なバッファー内の UnmanagedMemoryStream クラスの新しいインスタンスを初期化します。

Initialize(Byte*, Int64, Int64, FileAccess)

ソース:
UnmanagedMemoryStream.cs
ソース:
UnmanagedMemoryStream.cs
ソース:
UnmanagedMemoryStream.cs
ソース:
UnmanagedMemoryStream.cs
ソース:
UnmanagedMemoryStream.cs

重要

この API は CLS 準拠ではありません。

アンマネージ メモリの場所へのポインターを使用して、 UnmanagedMemoryStream クラスの新しいインスタンスを初期化します。

protected:
 void Initialize(System::Byte* pointer, long length, long capacity, System::IO::FileAccess access);
[System.CLSCompliant(false)]
[System.Security.SecurityCritical]
protected void Initialize(byte* pointer, long length, long capacity, System.IO.FileAccess access);
[System.CLSCompliant(false)]
protected void Initialize(byte* pointer, long length, long capacity, System.IO.FileAccess access);
protected void Initialize(byte* pointer, long length, long capacity, System.IO.FileAccess access);
[<System.CLSCompliant(false)>]
[<System.Security.SecurityCritical>]
member this.Initialize : nativeptr<byte> * int64 * int64 * System.IO.FileAccess -> unit
[<System.CLSCompliant(false)>]
member this.Initialize : nativeptr<byte> * int64 * int64 * System.IO.FileAccess -> unit
member this.Initialize : nativeptr<byte> * int64 * int64 * System.IO.FileAccess -> unit

パラメーター

pointer
Byte*

アンマネージ メモリの場所へのポインター。

length
Int64

使用するメモリの長さ。

capacity
Int64

ストリームに割り当てられたメモリの合計量。

access
FileAccess

FileAccess値の 1 つ。

属性

例外

ユーザーに必要なアクセス許可がありません。

pointer 値は nullです。

length 値が 0 未満です。

-又は-

capacity 値が 0 未満です。

-又は-

length値は、オーバーフローを引き起こすのに十分な大きさです。

注釈

このメソッドは、 UnmanagedMemoryStream コンストラクターと同じです。 ストリーム変数を設定する前にポインターを初期化する必要があるメソッドがサポートされているため、パラメーター化されたコンストラクターを呼び出すことはできません。 このようなメソッドでは、パラメーターなしのコンストラクターを使用して UnmanagedMemoryStream()し、ポインターを初期化してから、 Initialize メソッドを呼び出す必要があります。

適用対象

Initialize(SafeBuffer, Int64, Int64, FileAccess)

ソース:
UnmanagedMemoryStream.cs
ソース:
UnmanagedMemoryStream.cs
ソース:
UnmanagedMemoryStream.cs
ソース:
UnmanagedMemoryStream.cs
ソース:
UnmanagedMemoryStream.cs

指定したオフセット、長さ、およびファイル アクセスを使用して、安全なバッファー内の UnmanagedMemoryStream クラスの新しいインスタンスを初期化します。

protected:
 void Initialize(System::Runtime::InteropServices::SafeBuffer ^ buffer, long offset, long length, System::IO::FileAccess access);
protected void Initialize(System.Runtime.InteropServices.SafeBuffer buffer, long offset, long length, 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, length As Long, access As FileAccess)

パラメーター

buffer
SafeBuffer

アンマネージ メモリ ストリームを格納するバッファー。

offset
Int64

アンマネージ メモリ ストリームを開始するバッファー内のバイト位置。

length
Int64

アンマネージ メモリ ストリームの長さ。

access
FileAccess

アンマネージド メモリ ストリームへのファイル アクセスのモード。

適用対象