Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disk space problems
Message
 
À
15/01/1999 10:40:46
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00176492
Message ID:
00176528
Vues:
26
Hi Dave,

>Has anyone encountered FPD2.6 not recognizing disk space on a FAT-32 system with greater than 5 gig drives?

Yes. DOS was only able to determine 2 GB of free disk space. If you enter DIR on such a drive you commonly got 1,999,999,999 bytes free. FoxPro can handle up to 4 GB, but will return more than 2 GB as a negative value. For more than 4 GG, it starts again, that means 5 GB are reported as 1 GB. The following routine works up to 4 GB of free disk space:
*==================================================
* Returns the available diskspace
*==================================================
Parameter tcDrive

	*-----------------------------------------------
	* evaluate parameter
	*-----------------------------------------------
	Private lcDrive
	If Parameter() == 1
		lcDrive = tcDrive
	Else
		lcDrive = Sys(5)
	Endif
	
	*-----------------------------------------------
	* Get free disk space
	*-----------------------------------------------
	Private lcDefault, lnSize
	lcDefault = Sys(5) + Sys(2003)
	Set Default to &lcDrive
	lnSize = Diskspace()
	If lnSize < 0
		lnSize = lnSize + 2^32
	Endif
	Set Default to &lcDefault

Return lnSize
Christof
--
Christof
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform