UnmanagedMemoryAccessor.Initialize Método

Definição

Define os valores iniciais para o acessório.

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)

Parâmetros

buffer
SafeBuffer

O buffer para conter o acessório.

offset
Int64

O byte a partir do qual iniciar o acessório.

capacity
Int64

O tamanho, em bytes, da memória a alocar.

access
FileAccess

O tipo de acesso permitido à memória. A predefinição é ReadWrite.

Exceções

offset mais capacity é maior que buffer.

buffer é null.

offset ou capacity é inferior a zero.

-ou-

access não é um valor de enumeração válido MemoryMappedFileAccess .

offset Além disso capacity , envolveria o topo do espaço de endereçamento.

Observações

Este método é chamado pelos construtores desta classe.

Aplica-se a