Unmanaged​Memory​Accessor Class

Definition

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

public class UnmanagedMemoryAccessor : IDisposable
Inheritance
UnmanagedMemoryAccessor
Derived
Implements

Inherited Members

System.Object

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

Unmanaged​Memory​Accessor()

Initializes a new instance of the UnmanagedMemoryAccessor class.

Unmanaged​Memory​Accessor(​Safe​Buffer, ​Int64, ​Int64)

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

Unmanaged​Memory​Accessor(​Safe​Buffer, ​Int64, ​Int64, ​File​Access)

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

Properties

Can​Read

Determines whether the accessor is readable.

Can​Write

Determines whether the accessory is writable.

Capacity

Gets the capacity of the accessor.

Is​Open

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.

Initialize(​Safe​Buffer, ​Int64, ​Int64, ​File​Access)

Sets the initial values for the accessor.

Read<​T>(​Int64, ​T)

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

Read​Array<​T>(​Int64, ​T[], ​Int32, ​Int32)

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

Read​Boolean(​Int64)

Reads a Boolean value from the accessor.

Read​Byte(​Int64)

Reads a byte value from the accessor.

Read​Char(​Int64)

Reads a character from the accessor.

Read​Decimal(​Int64)

Reads a decimal value from the accessor.

Read​Double(​Int64)

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

Read​Int16(​Int64)

Reads a 16-bit integer from the accessor.

Read​Int32(​Int64)

Reads a 32-bit integer from the accessor.

Read​Int64(​Int64)

Reads a 64-bit integer from the accessor.

Read​SByte(​Int64)

Reads an 8-bit signed integer from the accessor.

Read​Single(​Int64)

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

Read​UInt16(​Int64)

Reads an unsigned 16-bit integer from the accessor.

Read​UInt32(​Int64)

Reads an unsigned 32-bit integer from the accessor.

Read​UInt64(​Int64)

Reads an unsigned 64-bit integer from the accessor.

Write(​Int64, ​UInt64)

Writes an unsigned 64-bit integer into the accessor.

Write(​Int64, ​UInt32)

Writes an unsigned 32-bit integer into the accessor.

Write(​Int64, ​UInt16)

Writes an unsigned 16-bit integer into the accessor.

Write(​Int64, ​Single)

Writes a Single into the accessor.

Write(​Int64, ​SByte)

Writes an 8-bit integer into the accessor.

Write(​Int64, ​Int64)

Writes a 64-bit integer 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, ​Decimal)

Writes a decimal value into the accessor.

Write(​Int64, ​Char)

Writes a character into the accessor.

Write(​Int64, ​Byte)

Writes a byte value into the accessor.

Write(​Int64, ​Boolean)

Writes a Boolean value into the accessor.

Write(​Int64, ​Int32)

Writes a 32-bit integer into the accessor.

Write<​T>(​Int64, ​T)

Writes a structure into the accessor.

Write​Array<​T>(​Int64, ​T[], ​Int32, ​Int32)

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