SafeMemoryMappedViewHandle SafeMemoryMappedViewHandle SafeMemoryMappedViewHandle SafeMemoryMappedViewHandle Class

Definición

Proporciona un controlador seguro que representa una vista de un bloque de memoria no administrada para el acceso aleatorio.Provides a safe handle that represents a view of a block of unmanaged memory for random access.

public ref class SafeMemoryMappedViewHandle sealed : System::Runtime::InteropServices::SafeBuffer
[System.Security.SecurityCritical(System.Security.SecurityCriticalScope.Everything)]
public sealed class SafeMemoryMappedViewHandle : System.Runtime.InteropServices.SafeBuffer
type SafeMemoryMappedViewHandle = class
    inherit SafeBuffer
Public NotInheritable Class SafeMemoryMappedViewHandle
Inherits SafeBuffer
Herencia
Atributos

Comentarios

Use el MemoryMappedViewAccessor.SafeMemoryMappedViewHandle propiedad que se va a obtener el identificador seguro.Use the MemoryMappedViewAccessor.SafeMemoryMappedViewHandle property to obtain the safe handle.

Importante

Este tipo implementa la IDisposable interfaz.This type implements the IDisposable interface. Cuando haya terminado de utilizar el tipo, debe deshacerse de él directa o indirectamente.When you have finished using the type, you should dispose of it either directly or indirectly. Para deshacerse del tipo directamente, llame a su Dispose método en un try / catch bloque.To dispose of the type directly, call its Dispose method in a try/catch block. Para deshacerse de él, indirectamente, usar una construcción de lenguaje, como using (en C#) o Using (en Visual Basic).To dispose of it indirectly, use a language construct such as using (in C#) or Using (in Visual Basic). Para obtener más información, vea la sección "Uso de un objeto que implementa IDisposable" en el IDisposable tema de la interfaz.For more information, see the "Using an Object that Implements IDisposable" section in the IDisposable interface topic.

Métodos

AcquirePointer(Byte*) AcquirePointer(Byte*) AcquirePointer(Byte*) AcquirePointer(Byte*)

Obtiene un puntero de un objeto SafeBuffer para un bloque de memoria.Obtains a pointer from a SafeBuffer object for a block of memory.

(Inherited from SafeBuffer)

Close() Close() Close() Close()

Marca el identificador para soltar y liberar recursos.Marks the handle for releasing and freeing resources.

(Inherited from SafeHandle)

DangerousAddRef(Boolean) DangerousAddRef(Boolean) DangerousAddRef(Boolean) DangerousAddRef(Boolean)

Aumenta manualmente el recuento de referencias en instancias de SafeHandle.Manually increments the reference counter on SafeHandle instances.

(Inherited from SafeHandle)

DangerousGetHandle() DangerousGetHandle() DangerousGetHandle() DangerousGetHandle()

Devuelve el valor del campo handle.Returns the value of the handle field.

(Inherited from SafeHandle)

DangerousRelease() DangerousRelease() DangerousRelease() DangerousRelease()

Disminuye manualmente el recuento de referencias en una instancia de SafeHandle.Manually decrements the reference counter on a SafeHandle instance.

(Inherited from SafeHandle)

Dispose() Dispose() Dispose() Dispose()

Libera todos los recursos que utiliza la clase SafeHandle.Releases all resources used by the SafeHandle class.

(Inherited from SafeHandle)

Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

Libera los recursos no administrados utilizados por la clase SafeHandle que especifica si se va a realizar una operación de desecho normal.Releases the unmanaged resources used by the SafeHandle class specifying whether to perform a normal dispose operation.

(Inherited from SafeHandle)

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determina si el objeto especificado es igual al objeto actual.Determines whether the specified object is equal to the current object.

(Inherited from Object)

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Sirve como la función hash predeterminada.Serves as the default hash function.

(Inherited from Object)

GetType() GetType() GetType() GetType()

Obtiene el Type de la instancia actual.Gets the Type of the current instance.

(Inherited from Object)

Initialize(UInt32, UInt32) Initialize(UInt32, UInt32) Initialize(UInt32, UInt32) 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.

(Inherited from SafeBuffer)

Initialize(UInt64) Initialize(UInt64) Initialize(UInt64) 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.

(Inherited from SafeBuffer)

Initialize(UInt32) Initialize(UInt32) Initialize(UInt32) Initialize(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.

(Inherited from SafeBuffer)

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Crea una copia superficial del objeto Object actual.Creates a shallow copy of the current Object.

(Inherited from Object)

Read(UInt64) Read(UInt64) Read(UInt64) Read(UInt64)

Lee un tipo de valor de la memoria en el desplazamiento especificado.Reads a value type from memory at the specified offset.

(Inherited from SafeBuffer)

ReadArray(UInt64, T[], Int32, Int32) ReadArray(UInt64, T[], Int32, Int32) ReadArray(UInt64, T[], Int32, Int32) ReadArray(UInt64, T[], Int32, Int32)

Lee el número especificado de tipos de valor de la memoria empezando en el desplazamiento y los escribe en una matriz empezando en el índice.Reads the specified number of value types from memory starting at the offset, and writes them into an array starting at the index.

(Inherited from SafeBuffer)

ReleaseHandle() ReleaseHandle() ReleaseHandle() ReleaseHandle()

Cuando se invalida en una clase derivada, ejecuta el código necesario para liberar el identificador.When overridden in a derived class, executes the code required to free the handle.

(Inherited from SafeHandle)

ReleasePointer() ReleasePointer() ReleasePointer() ReleasePointer()

Libera un puntero obtenido por el método AcquirePointer(Byte*).Releases a pointer that was obtained by the AcquirePointer(Byte*) method.

(Inherited from SafeBuffer)

SetHandle(IntPtr) SetHandle(IntPtr) SetHandle(IntPtr) SetHandle(IntPtr)

Establece el identificador en el identificador preexistente.Sets the handle to the specified pre-existing handle.

(Inherited from SafeHandle)

SetHandleAsInvalid() SetHandleAsInvalid() SetHandleAsInvalid() SetHandleAsInvalid()

Marca un identificador para indicar que ya no se utiliza.Marks a handle as no longer used.

(Inherited from SafeHandle)

ToString() ToString() ToString() ToString()

Devuelve una cadena que representa el objeto actual.Returns a string that represents the current object.

(Inherited from Object)

Write(UInt64, T) Write(UInt64, T) Write(UInt64, T) Write(UInt64, T)

Escribe un tipo de valor en la memoria en la ubicación dada.Writes a value type to memory at the given location.

(Inherited from SafeBuffer)

WriteArray(UInt64, T[], Int32, Int32) WriteArray(UInt64, T[], Int32, Int32) WriteArray(UInt64, T[], Int32, Int32) WriteArray(UInt64, T[], Int32, Int32)

Escribe el número especificado de tipos de valor en una ubicación de memoria leyendo bytes a partir de la ubicación especificada en la matriz de entrada.Writes the specified number of value types to a memory location by reading bytes starting from the specified location in the input array.

(Inherited from SafeBuffer)

Propiedades

ByteLength ByteLength ByteLength ByteLength

Obtiene el tamaño del búfer, en bytes.Gets the size of the buffer, in bytes.

(Inherited from SafeBuffer)

IsClosed IsClosed IsClosed IsClosed

Obtiene un valor que indica si el identificador está cerrado.Gets a value indicating whether the handle is closed.

(Inherited from SafeHandle)

IsInvalid IsInvalid IsInvalid IsInvalid

Inherited from SafeBuffer

Campos

handle handle handle handle

Especifica el identificador que se va a ajustar.Specifies the handle to be wrapped.

(Inherited from SafeHandle)

Se aplica a