RtlClearBits routine

The RtlClearBits routine sets all bits in the specified range of bits in the bitmap to zero.

Syntax


VOID RtlClearBits(
  _In_ PRTL_BITMAP BitMapHeader,
  _In_ ULONG       StartingIndex,
  _In_ ULONG       NumberToClear
);

Parameters

BitMapHeader [in]

A pointer to the RTL_BITMAP structure that describes the bitmap. This structure must have been initialized by the RtlInitializeBitMap routine.

StartingIndex [in]

The index of the first bit in the bit range that is to be cleared. If the bitmap contains N bits, the bits are numbered from 0 to N-1.

NumberToClear [in]

Specifies how many bits to clear. If the bitmap contains N bits, this parameter can be a value in the range 1 to (N - StartingIndex).

Return value

This routine does not return a value.

Remarks

If the NumberToClear parameter is zero, RtlClearBits simply returns control without clearing any bits.

The sum (StartingIndex + NumberToClear) must not exceed the SizeOfBitMap parameter value specified in the RtlInitializeBitMap call that initialized the bitmap.

Callers of RtlClearBits must be running at IRQL <= APC_LEVEL if the memory that contains the bitmap is pageable or the memory at BitMapHeader is pageable. Otherwise, RtlClearBits can be called at any IRQL.

Requirements

Target platform

Universal

Version

Available starting with Windows 2000.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

NtosKrnl.lib

DLL

NtosKrnl.exe

IRQL

<= APC_LEVEL (See Remarks section.)

See also

RtlAreBitsSet
RTL_BITMAP
RtlClearAllBits
RtlFindSetBits
RtlFindSetBitsAndClear
RtlInitializeBitMap
RtlNumberOfSetBits

 

 

Send comments about this topic to Microsoft

Show: