示例#1
0
BOOL
CNdasUnitDiskDevice::HasSameDIBInfo()
{
	CNdasUnitDeviceCreator udCreator(GetParentDevice(), GetUnitNo());

	CNdasUnitDevicePtr pUnitDeviceNow( udCreator.CreateUnitDevice() );

	if (CNdasUnitDeviceNullPtr== pUnitDeviceNow) 
	{
		return FALSE;
	}

	if (GetType() != pUnitDeviceNow->GetType()) 
	{
		return FALSE;
	}

	CNdasUnitDiskDevice* pUnitDiskDeviceNow = 
		reinterpret_cast<CNdasUnitDiskDevice*>(pUnitDeviceNow.get());

	if (!HasSameDIBInfo(*pUnitDiskDeviceNow)) 
	{
		return FALSE;
	}

	return TRUE;
}
示例#2
0
BOOL
CNdasUnitDiskDevice::HasSameDIBInfo()
{
	CNdasUnitDeviceCreator udCreator(*GetParentDevice(), GetUnitNo());

	CNdasUnitDevice* pUnitDeviceNow = udCreator.CreateUnitDevice();

	if(NULL == pUnitDeviceNow) {
		return FALSE;
	}

	if (GetType() != pUnitDeviceNow->GetType()) {
		delete pUnitDeviceNow;
		return FALSE;
	}

	CNdasUnitDiskDevice* pUnitDiskDeviceNow = 
		reinterpret_cast<CNdasUnitDiskDevice*>(pUnitDeviceNow);

	if(!HasSameDIBInfo(*pUnitDiskDeviceNow)) {
		delete pUnitDeviceNow;
		return FALSE;
	}

	delete pUnitDeviceNow;
	return TRUE;
}
示例#3
0
	NDAS_LOGICALDEVICE_ID UnitDevice::GetLogicalDeviceId()
	{
		NDAS_LOGICALDEVICE_ID logicalDeviceId;
		BOOL fSuccess = ::NdasFindLogicalDeviceOfUnitDevice(
			GetSlotNo(), GetUnitNo(), &logicalDeviceId);
		if (!fSuccess) {
			return NullNdasLogicalDeviceId();
		}

		return logicalDeviceId;
	}