void GetVolumeInfo (char* Volume) { char Name [256]; char FileSysName [256]; DWORD SerialNumber; DWORD MaxLength; DWORD FileSysFlags; DWORD SectorsPerCluster; DWORD BytesPerSector; DWORD NumberOfFreeClusters; DWORD TotalNumberOfClusters; if (GetVolumeInformation ( Volume, Name, 256, &SerialNumber, &MaxLength, &FileSysFlags, FileSysName, 256)) { GetDiskFreeSpace ( Volume, &SectorsPerCluster, &BytesPerSector, &NumberOfFreeClusters, &TotalNumberOfClusters); sprintf (parserdata,"## VOLUME %s INFO<br> Name : %s<br> Serial number : %i<br> File system : %s<br> Total number of clusters : %i<br>",Volume,Name,SerialNumber,FileSysName,TotalNumberOfClusters); } else sprintf (parserdata,"## WRONG VOLUME NAME !<br>"); } |