Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SYS(2020) with FAT32 drives
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00255126
Message ID:
00255256
Views:
13
>SYS(2020) doesn't appear to report the right disk size on my FAT32 drive in VFP6. (It returns 2,147,155,968 on my 4.3GB disk.)
>
>Is there a workaround?
>Thanks.
>
Hi John,

The problem isn't so much a VFP bug, as one with Windows. The Win32 SDK documents that, "The GetDiskFreeSpace function returns incorrect values for volumes that are larger than 2 gigabytes. The function caps the values stored into *lpNumberOfFreeClusters and *lpTotalNumberOfClusters so as to never report volume sizes that are greater than 2 gigabytes." It further goes on to say that Applications should use GetDiskFreeSpaceEx(). However, this function wasn't in the original Win95 release. It became available in OEM Service Release 2 (OSR 2). VFP is probably calling GetDiskFreeSpace() and that's the reason for this behavior.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform