|
已经解决了!谢谢各位!如下:
void Ctest_memoryDlg::OnBnClickedButton1()
{
// Now get info on the NAND flash disk
STOREINFO storeInfo;
memset( &storeInfo, 0x00, sizeof(storeInfo) );
storeInfo.cbSize = sizeof(storeInfo);
HANDLE hFindDsk = FindFirstStore( &storeInfo );
PARTINFO partInfo;
memset( &partInfo, 0x00, sizeof(partInfo) );
partInfo.cbSize = sizeof(partInfo);
CE_VOLUME_INFO volumeInfo;
memset( &volumeInfo, 0x00, sizeof(volumeInfo) );
volumeInfo.cbSize = sizeof(volumeInfo);
if( hFindDsk != INVALID_HANDLE_VALUE )
{
HANDLE hDsk = OpenStore( /*L"Nandflash"*/storeInfo.szDeviceName );
if( hDsk != INVALID_HANDLE_VALUE )
{
HANDLE hFindPart = FindFirstPartition( hDsk, &partInfo );
if( hFindPart != INVALID_HANDLE_VALUE )
{
CeGetVolumeInfo( partInfo.szVolumeName,CeVolumeInfoLevelStandard, &volumeInfo );
BOOL isTFAT;
isTFAT = ( ( volumeInfo.dwFlags & CE_VOLUME_TRANSACTION_SAFE ) != 0 );
if (isTFAT)
{
printf("tfat\n");
}
else
{
printf("not tfat\n");
}
}
if(FindNextPartition(hFindPart,&partInfo ) == TRUE)
{
CeGetVolumeInfo( partInfo.szVolumeName,CeVolumeInfoLevelStandard, &volumeInfo );
BOOL isTFAT;
isTFAT = ( ( volumeInfo.dwFlags & CE_VOLUME_TRANSACTION_SAFE ) != 0 );
if (isTFAT)
{
printf("%s is tfat\n",partInfo.szVolumeName);
}
else
{
printf("%s if not tfat\n",partInfo.szVolumeName);
}
FindClosePartition( hFindPart );;
}
CloseHandle( hDsk );
}
FindCloseStore( hDsk );
} |
|