Can someone help me out with the GetDiskFreeSpace API?
Here is what i have and i'm getting values that don't seem correct.
thx in advance for any helpCode:unsigned long *lpSectorsPerCluster; unsigned long *lpBytesPerSector; unsigned long *lpNumberOfFreeClusters; unsigned long *lpTotalNumberOfClusters; GetDiskFreeSpace("C:", lpSectorsPerCluster, lpBytesPerSector, lpNumberOfFreeClusters, lpTotalNumberOfClusters); cout << ((*lpTotalNumberOfClusters / 100) * (*lpSectorsPerCluster / 100) * (*lpBytesPerSector / 100))<< " Bytes Total" << endl; cout << ((*lpNumberOfFreeClusters / 100) * (*lpSectorsPerCluster / 100) * (*lpBytesPerSector / 100)) << " Bytes Free" << endl;




Reply With Quote