예제 #1
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;
}
예제 #2
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;
}