Microsoft DirectX 8.1 (C++) |
Counts the number of prefix bits.
Syntax
DWORD CountPrefixBits(
const DWORD Field
);
Parameters
Field
Input bitmask field.
Return Value
No return value.
Remarks
Given a bitmask, this helper member function counts the number of zero bits up to the least significant set bit. So, for a binary number 00000100, the member function returns 2 (decimal). The member function does, however, work on DWORD values, so it counts from the least significant bit up through the DWORD to the last bit (0x80000000). If no bits are found, this will return the (impossible) value 32 (decimal).
This is a protected member function.
See Also