"For a successful call, the returned bit position is not necessarily
equivalent to the given HintIndex. If necessary, RtlFindSetBits searches
the whole bitmap to locate a set bit range of the requested size.
However, it starts searching for the requested range near HintIndex, so
callers can find such a range more quickly when they can supply
appropriate hints about where to start looking. "
The function is working as documented. Hint is the starting index, the
search covers the entire bitmap starting at hint.
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Petr Kurtin
Sent: Monday, January 02, 2006 12:07 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] RtlFindSetBits
Hello,
according to DDK help, it returns 0xFFFFFFFF if it cant find number
of set bits within the given bitmap (from HintIndex to the end).
os: xpsp1
RtlInitializeBitmap( ) - init for 256 items
RtlClearAllBits( )
RtlSetBits( pBitmap, 0x11, 1 )
RtlSetBits( pBitmap, 0xB0, 1 )
RtlFindSetBits( pBitmap, 1, 0x22 ) - returns 0xB0
RtlFindSetBits( pBitmap, 1, 0xB1 ) - returns 0x11 (!)
why 0x11 instead of -1 ?
thanks, pk
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com