I am using Delphi 3 and am having trouble determining the amount of free disk space on my 40gb hard drive's drive letter C. I am using the following code...
freeSpace : Double;
// Drive letter
s := 'C';
freeSpace := DiskFree(Ord(s) - 64);
Unfortunately freeSpace comes back as 1,687,274,496 when in fact the correct free disk space, according to a command prompt DIR is...
86 Dir(s) 10,278,877,696 bytes free
Any idea what I'm doing wrong?