BitShiftMaskSign - Shift, mask and sign a 32 bit value |
Top Previous Next |
<nReturnValue> := BitShiftMaskSign( <nValLong>, <nByteShiftRightCount>, <nValidByteCount>, <lUnsigned> ) <nValLong>
The LONG value to be manipulated
<nByteShiftRightCount>
The number of bytes the value is to be shifted right. Valid values: 0, 1, 2, 3.
<nValidByteCount>
The number of valid bytes (from the right). This is the masking part of the compound operation. Valid values: 0, 1, 2, 4.
<lUnsigned>
Flag if the resulting number should be interpreted as unsigned. The resulting value after the shifting, masking and sign-interpreting. BitShiftMaskSign is a compound operation used for data extraction from LONG values. It implements a byte wise shift right which allows to move the data you're interested in to the right in the 32bit value. After that you can cut off insignificant data on the left by specifying a number of valid bytes on the right. The result of these operations can be interpreted as a signed or an unsigned value. This function is used for the data-extraction macros found in windef.ch. Core Library: cckptcor.lib / cckptcor.dll
|