UINT8 i; i = CH375DiskQuery( ); mStopIfError( i ); i = CH375DiskSize( ); mStopIfError( i ); #ifdef DEBUG printf("The Free sec is :%u,%u,%u\n",CH375vSectorSize,mCmdParam.DiskSize.mDiskSizeSec,mCmdParam.Query.mFreeSector); #endif return((unsigned int)(mCmdParam.DiskSize.mDiskSizeSec*mCmdParam.Query.mFreeSector /1024/1024)); // 返回為以MB為單位的剩余容量
結(jié)果顯示為The Free sec is :512,53503,31 計算得到的剩余空間為The Free Size is :3429M 我的U盤才1G的?。? 不知道錯在什么地方了,是不是我的函數(shù)用錯了?