UnmanagedMemoryAccessor.Initialize(SafeBuffer, Int64, Int64, FileAccess) Método

Definição

Define os valores iniciais do acessador.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)

Parâmetros

buffer
SafeBuffer

O buffer que conterá o acessador.The buffer to contain the accessor.

offset
Int64

O byte no qual o acessador é iniciado.The byte at which to start the accessor.

capacity
Int64

O tamanho, em bytes, da memória a ser alocada.The size, in bytes, of memory to allocate.

access
FileAccess

O tipo de acesso permitido à memória.The type of access allowed to the memory. O padrão é ReadWrite.The default is ReadWrite.

Exceções

offset mais capacity é maior que buffer.offset plus capacity is greater than buffer.

buffer é null.buffer is null.

offset ou capacity é menor que zero.offset or capacity is less than zero.

- ou --or- access não é um valor de enumeração MemoryMappedFileAccess válido.access is not a valid MemoryMappedFileAccess enumeration value.

offset mais capacity encapsularia a extremidade alta do espaço de endereço.offset plus capacity would wrap around the high end of the address space.

Comentários

Esse método é chamado pelos construtores para essa classe.This method is called by the constructors for this class.

Aplica-se a