UtilsLib REALbasic Plugin

MemoryBlock.CopyBitsTo Method

Use this method to copy a block of bits from one MemoryBlock to another.

CopyBitsTo(
   srcByteOffset as Integer,
   srcBitOffset as Integer,
   dest as MemoryBlock,
   dstByteOffset as Integer,
   dstBitOffset as Integer,
   bitCount as Integer)

Parameters

srcByteOffset
This parameter can be used to specify byte offset into the source MemoryBlock.
srcBitOffset
This parameter can be used to specify bit offset into the source MemoryBlock.
dest
The destination MemoryBlock.
dstByteOffset
This parameter can be used to specify byte offset into the destination MemoryBlock.
dstBitOffset
This parameter can be used to specify bit offset into the destination MemoryBlock.
bitCount
The count of bits to copy.

Remarks

This method is not bounds checked in any way. You are responsible for making sure you don't go out of bounds.

Note that this is bitwise copy, not byte wise and is because of that not very efficient. You can for example copy 5 bits.

This method is available on REALbasic 5.0 systems by adding a MemoryBlock parameter in front of other parameters.

Supported Platforms:

  • PPC - MacOS 9
  • Carbon - MacOS 9 and MacOS X (PEF)
  • MacOS X PPC - (Mach-O)
  • MacOS X Universal Binary (Mach-O)
  • Win32 - Windows
  • Linux x86

    See Also

    MemoryBlock Class Extension