Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetDiskFreeSpace and the like
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00620479
Message ID:
00621139
Vues:
10
>>You've to specify in DECLARE that those parameter're passed by reference, properly initialize them and pass by reference to the function.
DECLARE LONG GetDiskFreeSpace IN kernel32 ;
>>	STRING, LONG @, LONG @, LONG @, LONG @
>>LOCAL ret, strDrive, lngSectors, lngBytes, lngFreec, lngTotalc
>>STORE 0 TO lngSectors, lngBytes, lngFreec, lngTotalc
>>ret = GetDiskFreeSpace(strDrive, @lngSectors, @lngBytes, @lngFreec, @lngTotalc)
>>? ret, lngSectors, lngBytes, lngFreec, lngTotalc
>>
>>
The function GetDiskFreeSpace has a bug. See faq #7847 for to how get correct info.
>
>Actually, it isn't a bug, it was a limitation based on the technology at the time it was written. Since any signed integer greater than 2gb is a negative number, the function caps the maximum result at that amount. This is why GetDiskFreeSpaceEx() uses a datatype known as ULARGE_INTEGER (an unsigned 64 bit integer. In reality, this is actually a structure made up of two DWORDs.

You're rigt. It's bad wording on my part.
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform