Buffer: BlockCopy

BlockCopy

Copies the bytes from the source array to the destination array.



 Public Sub BlockCopy(
	  ByRef Source As Variant,
	  ByVal SourceOffset As Long,
	  ByRef Destination As Variant,
	  ByVal DestinationOffset As Long,
	  ByVal Count As Long )

Parameters

Source
[ByRef] Variant. The array to copy bytes from.
SourceOffset
[ByVal] Long. The starting byte position to begin copying.
Destination
[ByRef] Variant. The array to receive the bytes.
DestinationOffset
[ByVal] Long. The starting byte position to begin setting bytes.
Count
[ByVal] Long. The number of bytes to be copied.

Remarks

The arrays are treated as byte arrays, so no data-type conversion takes place. All indexes are in bytes, not in the type of the specific array.

The lower-bound of the arrays is ignored. The first byte is at index 0.

Exceptions

ExceptionCondition
ArgumentNullExceptionSource or Destination is uninitialized.
ArgumentException Source or Destination is not an array.
-or-
The number of bytes in Source is less than SourceOffset plus Count.
-or-
The number of bytes in Destination is less than DestinationOffset plus Count.
ArgumentOutOfRangeExceptionSource, Destination, or Count is less than zero.

See Also

Project CorLib Overview

Class Buffer Overview