Example #1
0
	void AddressBlock::Set(WORD wHigh, MemoryBlock block)
	{
		mHiWord = wHigh;
		DWORD dwCur = BIT_NOT_FOUND;
		DWORD i = 0;
		mLoWords = new LoWordList(block.InUse());
		while ((dwCur = block.FindNextUsed(dwCur)) != BIT_NOT_FOUND)	// Use the built in bitfield search functions
		{															// to find the next used bit
			mLoWords->SetValue((WORD)i, (USHORT)dwCur);
			++i;
		}
		assert(i == block.InUse());		// Make sure a match, should work fine however
	}