Export (0) Print
Expand All

UnmanagedMemoryAccessor Class

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

Namespace:  System.IO
Assembly:  mscorlib (in mscorlib.dll)

public class UnmanagedMemoryAccessor : IDisposable

The UnmanagedMemoryAccessor type exposes the following members.

  NameDescription
Protected methodUnmanagedMemoryAccessor()Initializes a new instance of the UnmanagedMemoryAccessor class.
Public methodUnmanagedMemoryAccessor(SafeBuffer, Int64, Int64)Initializes a new instance of the UnmanagedMemoryAccessor class with a specified buffer, offset, and capacity.
Public methodUnmanagedMemoryAccessor(SafeBuffer, Int64, Int64, FileAccess)Initializes a new instance of the UnmanagedMemoryAccessor class with a specified buffer, offset, capacity, and access right.
Top

  NameDescription
Public propertyCanReadDetermines whether the accessor is readable.
Public propertyCanWriteDetermines whether the accessory is writable.
Public propertyCapacityGets the capacity of the accessor.
Protected propertyIsOpenDetermines whether the accessor is currently open by a process.
Top

  NameDescription
Public methodDispose()Releases all resources used by the UnmanagedMemoryAccessor.
Protected methodDispose(Boolean)Releases the unmanaged resources used by the UnmanagedMemoryAccessor and optionally releases the managed resources.
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodInitializeSets the initial values for the accessor.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodRead<T>Reads a structure of type T from the accessor into a provided reference.
Public methodReadArray<T>Reads structures of type T from the accessor into an array of type T.
Public methodReadBooleanReads a Boolean value from the accessor.
Public methodReadByteReads a byte value from the accessor.
Public methodReadCharReads a character from the accessor.
Public methodReadDecimalReads a decimal value from the accessor.
Public methodReadDoubleReads a double-precision floating-point value from the accessor.
Public methodReadInt16Reads a 16-bit integer from the accessor.
Public methodReadInt32Reads a 32-bit integer from the accessor.
Public methodReadInt64Reads a 64-bit integer from the accessor.
Public methodReadSByteReads an 8-bit signed integer from the accessor.
Public methodReadSingleReads a single-precision floating-point value from the accessor.
Public methodReadUInt16Reads an unsigned 16-bit integer from the accessor.
Public methodReadUInt32Reads an unsigned 32-bit integer from the accessor.
Public methodReadUInt64Reads an unsigned 64-bit integer from the accessor.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodWrite(Int64, Boolean)Writes a Boolean value into the accessor.
Public methodWrite(Int64, Byte)Writes a byte value into the accessor.
Public methodWrite(Int64, Char)Writes a character into the accessor.
Public methodWrite(Int64, Decimal)Writes a decimal value into the accessor.
Public methodWrite(Int64, Double)Writes a Double value into the accessor.
Public methodWrite(Int64, Int16)Writes a 16-bit integer into the accessor.
Public methodWrite(Int64, Int32)Writes a 32-bit integer into the accessor.
Public methodWrite(Int64, Int64)Writes a 64-bit integer into the accessor.
Public methodWrite(Int64, SByte)Writes an 8-bit integer into the accessor.
Public methodWrite(Int64, Single)Writes a Single into the accessor.
Public methodWrite(Int64, UInt16)Writes an unsigned 16-bit integer into the accessor.
Public methodWrite(Int64, UInt32)Writes an unsigned 32-bit integer into the accessor.
Public methodWrite(Int64, UInt64)Writes an unsigned 64-bit integer into the accessor.
Public methodWrite<T>(Int64, T)Writes a structure into the accessor.
Public methodWriteArray<T>Writes structures from an array of type T into the accessor.
Top

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

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft