Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetDiskFreeSpaceEx() in WIN32API
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00315812
Message ID:
00315820
Vues:
35
>Is there a VFP solution to use GetDiskFreeSpaceEx()? I'm trying to get the FULL/USED/FREE size of the hard drive programatically. In the UT file section I found a wrapper for using GetDiskFreeSpace(), but it will not return the correct sizes for very large HDs.

Hi Doru, here is a message that George Tasker posted on this subject.

*******
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.
*******
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform