Επεξεργασία

Κοινή χρήση μέσω


UnmanagedMemoryAccessor Class

Definition

Provides random access to unmanaged blocks of memory from managed code.

public ref class UnmanagedMemoryAccessor : IDisposable
public class UnmanagedMemoryAccessor : IDisposable
type UnmanagedMemoryAccessor = class
    interface IDisposable
Public Class UnmanagedMemoryAccessor
Implements IDisposable
Inheritance
UnmanagedMemoryAccessor
Derived
Implements

Remarks

The CreateViewAccessor method of a MemoryMappedFile object returns the unmanaged blocks of memory for working with views of memory-mapped files.

Note

This type implements the IDisposable interface, but does not actually have any resources to dispose. This means that disposing it by directly calling Dispose() or by using a language construct such as using (in C#) or Using (in Visual Basic) is not necessary.

Constructors

UnmanagedMemoryAccessor()

Initializes a new instance of the UnmanagedMemoryAccessor class.

UnmanagedMemoryAccessor(SafeBuffer, Int64, Int64, FileAccess)

Initializes a new instance of the UnmanagedMemoryAccessor class with a specified buffer, offset, capacity, and access right.

UnmanagedMemoryAccessor(SafeBuffer, Int64, Int64)

Initializes a new instance of the UnmanagedMemoryAccessor class with a specified buffer, offset, and capacity.

Properties

CanRead

Determines whether the accessor is readable.

CanWrite

Determines whether the accessory is writable.

Capacity

Gets the capacity of the accessor.

IsOpen

Determines whether the accessor is currently open by a process.

Methods

Dispose()

Releases all resources used by the UnmanagedMemoryAccessor.

Dispose(Boolean)

Releases the unmanaged resources used by the UnmanagedMemoryAccessor and optionally releases the managed resources.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
Initialize(SafeBuffer, Int64, Int64, FileAccess)

Sets the initial values for the accessor.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Read<T>(Int64, T)

Reads a structure of type T from the accessor into a provided reference.

ReadArray<T>(Int64, T[], Int32, Int32)

Reads structures of type T from the accessor into an array of type T.

ReadBoolean(Int64)

Reads a Boolean value from the accessor.

ReadByte(Int64)

Reads a byte value from the accessor.

ReadChar(Int64)

Reads a character from the accessor.

ReadDecimal(Int64)

Reads a decimal value from the accessor.

ReadDouble(Int64)

Reads a double-precision floating-point value from the accessor.

ReadInt16(Int64)

Reads a 16-bit integer from the accessor.

ReadInt32(Int64)

Reads a 32-bit integer from the accessor.

ReadInt64(Int64)

Reads a 64-bit integer from the accessor.

ReadSByte(Int64)

Reads an 8-bit signed integer from the accessor.

ReadSingle(Int64)

Reads a single-precision floating-point value from the accessor.

ReadUInt16(Int64)

Reads an unsigned 16-bit integer from the accessor.

ReadUInt32(Int64)

Reads an unsigned 32-bit integer from the accessor.

ReadUInt64(Int64)

Reads an unsigned 64-bit integer from the accessor.

ToString()

Returns a string that represents the current object.

(Inherited from Object)
Write(Int64, Boolean)

Writes a Boolean value into the accessor.

Write(Int64, Byte)

Writes a byte value into the accessor.

Write(Int64, Char)

Writes a character into the accessor.

Write(Int64, Decimal)

Writes a decimal value into the accessor.

Write(Int64, Double)

Writes a Double value into the accessor.

Write(Int64, Int16)

Writes a 16-bit integer into the accessor.

Write(Int64, Int32)

Writes a 32-bit integer into the accessor.

Write(Int64, Int64)

Writes a 64-bit integer into the accessor.

Write(Int64, SByte)

Writes an 8-bit integer into the accessor.

Write(Int64, Single)

Writes a Single into the accessor.

Write(Int64, UInt16)

Writes an unsigned 16-bit integer into the accessor.

Write(Int64, UInt32)

Writes an unsigned 32-bit integer into the accessor.

Write(Int64, UInt64)

Writes an unsigned 64-bit integer into the accessor.

Write<T>(Int64, T)

Writes a structure into the accessor.

WriteArray<T>(Int64, T[], Int32, Int32)

Writes structures from an array of type T into the accessor.

Applies to