BOOL GetDiskAvail(PULARGE_INTEGER avail) { return GetDiskFreeSpaceEx("C:\\", avail, NULL, NULL); } void ExampleUse() { ULARGE_INTEGER avail; GetDiskAvail(&avail); printf("free disk space = %dI64\n", avail.QuadPart); }
Programming Tips - How can I find the amount of free (available) diskspace?
Date: 2010nov30
Platform: win32
Q. How can I find the amount of free (available) diskspace?
A. Here's a function that does that: