MemoryMappedViewAccessor: ReadArray

ReadArray

Reads structures of the type passed in from the accessor into an array of the type passed in.



 Public Function ReadArray(
	  ByVal Position As Long,
	  ByRef Arr As Variant,
	  ByVal Offset As Long,
	  ByVal Count As Long ) As Long

Parameters

Position
[ByVal] Long. The number of bytes in the accessor at which to begin reading.
Arr
[ByRef] Variant. The array to contain the structures read from the accessor.
Offset
[ByVal] Long. The index in array in which to place the first copied structure.
Count
[ByVal] Long. The number of structures of the type passed in to read from the accessor.

Return Values

Long -  The number of structures read into Arr. This value can be less than Count if there are fewer structures available, or zero if the end of the accessor is reached.

Exceptions

Exception Condition
ArgumentExceptionArr is not large enough to contain Count of structures (starting from Position).
ArgumentNullExceptionArr is null
ArgumentOutOfRangeExceptionPosition is less than zero or greater than the capacity of the accessor.
NotSupportedExceptionThe accessor does not support reading.

See Also

Project CorLib Overview

Class MemoryMappedViewAccessor Overview