Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetDiskFreeSpace() from WIN32API
Message
 
À
12/10/1996 20:50:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00009908
Message ID:
00009913
Vues:
31
Here you have a function for w95 and vfp 3.0b *function to return free space *for example: =mifree("c:\") * function mifree lparameters lcdrive local nTotal,nFree, nError,nNumberOfSectors ,nBytesPerSector ,nBytesPerSector ,nNumberOfFreeClusters ,nTotalOfClusters DECLARE ; INTEGER GetDiskFreeSpace ; in WIN32API ; STRING cDrive, ; INTEGER @nNumberOfSectors, ; INTEGER @nBytesPerSector, ; INTEGER @nNumberOfFreeClusters, ; INTEGER @nTotalOfClusters nNumberOfSectors =0 nBytesPerSector =0 nNumberOfFreeClusters =0 nTotalOfClusters=0 =GetDiskFreeSpace( ; lcDrive, ; @nNumberOfSectors, ; @nBytesPerSector, ; @nNumberOfFreeClusters, ; @nTotalOfClusters ; ) nTotal=nNumberOfSectors *nBytesPerSector *nTotalOfClusters nFree=nNumberOfSectors *nBytesPerSector *nNumberOfFreeClusters ? lcDrive,nNumberOfSectors,nBytesPerSector,nNumberOfFreeClusters ,nTotalOfClusters ? "Total:", transform(nTotal,"999,999,999,999")+ " Bytes" ? "Free:", transform(nfree,"999,999,999,999")+ " Bytes" return nfree I hope you enjoy it. Miguel
------------------------------------
Miguel Angel Hernaiz
miguel@gnomo.net --- miguel@vfug.org
ICQ: 3813422 --- www.gnomo.net
------------------------------------
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform