CopyBitsToField (class MKI_BITFIELD) New in Version 6.50

www.CAD6.com

C++ Syntax

void

MKI_BITFIELD::CopyBitsToField(

 const BYTE* f_pSource,

 const unsigned f_unSourceBit,

 const unsigned f_unDestinBit,

 const unsigned f_unBitCount );

 

Copies BitCount bits starting with the given bit number SourceBit of the byte array Source to the bitfield, starting there with the given bit number DestinBit.

 

Parameters

Source

[const BYTE*] Address of a sequence of bytes.

SourceBit

[const unsigned] First bit of Source to copy. Bit 0 is the highest bit in the first byte, bit 7 is the lowest bit in the first byte, bit 8 is the highest bit in the second byte, and so on.

DestinBit

[const unsigned] First bit of this to copy to. Bit 0 is the highest bit in the first byte, bit 7 is the lowest bit in the first byte, bit 8 is the highest bit in the second byte, and so on.

BitCount

[const unsigned] Number of bits to copy.

 

Comment

Please be careful with this method since it does not check for any boundaries!

 

CAD6interface 2024.2 - Copyright 2024 Malz++Kassner® GmbH