Programming Tips - Win32: Programmatically find the amount of free (available) diskspace

Date: 2010nov30 Platform: win32 Language: C/C++ Q. Win32: Programmatically find the amount of free (available) diskspace A. Here's a function that does that:
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); }