Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DiskSpace
Message
De
07/10/2002 17:26:55
 
 
À
07/10/2002 08:13:01
Emerson Reed
Folhamatic Tecnologia Em Sistemas
Americana - São Paulo, Brésil
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00708316
Message ID:
00708541
Vues:
13
>Why DiskSpace(Sys(5),2) works correctly and DiskSpace(Sys(5),1) returns 0 on Win 95 (Fat16)?
>I'm using VFP 7...

My guess is thagt you have a volume whose size is >2^31-1; a volume of 2GB (2^31) or larger computes out to an integer larger that the INTEGER data type; Win95 has always had a problem with miscast returns from certain API calls (NT family OSes will correctly cast these values as Reals or Doubles as necessary; Win95 is not cooperative in this issue.

You can always call the underlying API functions to retrieve these values; I believe that there are a number of downloads available that serve as wrappers on the GetDiskFreeSpaceEx() API (assuming that you have Win95 OSR2 or later, original retail Win95 and original Win95 with SP1, aka Win95a, do not support GetDiskFreeSpaceEx(), but you can use the returns from GetDiskFreeSpace() to compute these values based on sector and cluster size and the total number of clusters as returned by GetDiskFreeSpace() for FAT16, but will more than likely have fits working with large network volumes) which returns these values as ULARGE (64 bit unsigned integers) which, while not native to VFP, can be recast as Reals or Doubles and returned to VFP.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform