SafeBuffer.Initialize Método
Definición
Especifica el tamaño del búfer de memoria que se va a asignar.Specifies the size of the memory buffer to allocate. Debe llamar a este método antes de usar la instancia de SafeBuffer.You must call this method before you use the SafeBuffer instance.
Sobrecargas
Initialize(UInt64) |
Define el tamaño de asignación del área de memoria en bytes.Defines the allocation size of the memory region in bytes. Debe llamar a este método antes de usar la instancia de SafeBuffer.You must call this method before you use the SafeBuffer instance. |
Initialize(UInt32, UInt32) |
Especifica el tamaño de asignación del búfer de memoria utilizando el número especificado de elementos y tamaño de elemento.Specifies the allocation size of the memory buffer by using the specified number of elements and element size. Debe llamar a este método antes de usar la instancia de SafeBuffer.You must call this method before you use the SafeBuffer instance. |
Initialize<T>(UInt32) |
Define el tamaño de asignación del área de memoria especificando el número de tipos de valor.Defines the allocation size of the memory region by specifying the number of value types. Debe llamar a este método antes de usar la instancia de SafeBuffer.You must call this method before you use the SafeBuffer instance. |
Initialize(UInt64)
Importante
Esta API no es conforme a CLS.
Define el tamaño de asignación del área de memoria en bytes.Defines the allocation size of the memory region in bytes. Debe llamar a este método antes de usar la instancia de SafeBuffer.You must call this method before you use the SafeBuffer instance.
public:
void Initialize(System::UInt64 numBytes);
[System.CLSCompliant(false)]
public void Initialize (ulong numBytes);
[<System.CLSCompliant(false)>]
member this.Initialize : uint64 -> unit
Public Sub Initialize (numBytes As ULong)
Parámetros
- numBytes
- UInt64
El número de bytes en el búfer.The number of bytes in the buffer.
- Atributos
Excepciones
numBytes
es menor que cero.numBytes
is less than zero.
o bien-or-
numBytes
es mayor que el espacio de direcciones disponible.numBytes
is greater than the available address space.
Se aplica a
Initialize(UInt32, UInt32)
Importante
Esta API no es conforme a CLS.
Especifica el tamaño de asignación del búfer de memoria utilizando el número especificado de elementos y tamaño de elemento.Specifies the allocation size of the memory buffer by using the specified number of elements and element size. Debe llamar a este método antes de usar la instancia de SafeBuffer.You must call this method before you use the SafeBuffer instance.
public:
void Initialize(System::UInt32 numElements, System::UInt32 sizeOfEachElement);
[System.CLSCompliant(false)]
public void Initialize (uint numElements, uint sizeOfEachElement);
[<System.CLSCompliant(false)>]
member this.Initialize : uint32 * uint32 -> unit
Public Sub Initialize (numElements As UInteger, sizeOfEachElement As UInteger)
Parámetros
- numElements
- UInt32
Número de elementos que hay en el búfer.The number of elements in the buffer.
- sizeOfEachElement
- UInt32
Tamaño de cada elemento del búfer.The size of each element in the buffer.
- Atributos
Excepciones
numElements
es menor que cero.numElements
is less than zero.
o bien-or-
sizeOfEachElement
es menor que cero.sizeOfEachElement
is less than zero.
o bien-or-
numElements
multiplicado por sizeOfEachElement
es mayor que el espacio de direcciones disponible.numElements
multiplied by sizeOfEachElement
is greater than the available address space.
Comentarios
Este método define el tamaño necesario de la región de memoria como el número de elementos de una matriz multiplicado por el tamaño de cada elemento.This method defines the required size of the memory region as the number of elements in an array multiplied by the size of each element.
Se aplica a
Initialize<T>(UInt32)
Importante
Esta API no es conforme a CLS.
Define el tamaño de asignación del área de memoria especificando el número de tipos de valor.Defines the allocation size of the memory region by specifying the number of value types. Debe llamar a este método antes de usar la instancia de SafeBuffer.You must call this method before you use the SafeBuffer instance.
public:
generic <typename T>
where T : value class void Initialize(System::UInt32 numElements);
[System.CLSCompliant(false)]
public void Initialize<T> (uint numElements) where T : struct;
[<System.CLSCompliant(false)>]
member this.Initialize : uint32 -> unit (requires 'T : struct)
Public Sub Initialize(Of T As Structure) (numElements As UInteger)
Parámetros de tipo
- T
Tipo de valor para el que se va a asignar memoria.The value type to allocate memory for.
Parámetros
- numElements
- UInt32
Número de elementos del tipo de valor para el que se va a asignar memoria.The number of elements of the value type to allocate memory for.
- Atributos
Excepciones
numElements
es menor que cero.numElements
is less than zero.
o bien-or-
numElements
multiplicado por el tamaño de cada elemento es mayor que el espacio de direcciones disponible.numElements
multiplied by the size of each element is greater than the available address space.