Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetDiskFreeSpaceEx return negative value on overflow condit
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
GetDiskFreeSpaceEx return negative value on overflow condit
Divers
Thread ID:
00458588
Message ID:
00458588
Vues:
106
This code works on small drives with a parameter type of integer.
On large drives it return -1.0697E+9 with a parameter type of integer and
0.000E+0 with a parameter type of double.
Does anyone know how to set this up correctly to return the correct byte count for all drive sizes.

PUBLIC lpPathName, lpBytesToCall, lpTotalDiskBytes, lpFreeBytes
lpPathName = "A:\"
lpBytesToCall = 9
lpTotalDiskBytes = 9
lpFreeBytes = 9

DECLARE INTEGER GetDiskFreeSpaceEx IN WIN32API AS FREESPACE STRING @lpPathName,;
integer @lpBytesToCall, integer @lpTotalDiskBytes, integer @lpFreeBytes

RetVal = FREESPACE( @lpPathName, @lpBytesToCall, @lpTotalDiskBytes, @lpFreeBytes)
? "Path Free/Call Total/Bytes Free/Bytes"
? lpPathName
?? space(6)
?? lpBytesToCall
?? space(6)
?? lpTotalDiskBytes
?? space(6)
?? lpFreeBytes
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform