Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetDiskFreeSpace not working
Message
De
05/12/1997 21:11:52
 
 
À
05/12/1997 12:14:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00064049
Message ID:
00064215
Vues:
26
>lStartPath = getdir()
>lRootPathName = iif(len(lStartPath) >= 3, left(lStartPath, 3), "") + chr(0)

This is not an error, but the chr(0) is useless here.

>lSectorsPerCluster = 1
>lBytesPerSector = 2
>lNumberOfFreeClusters = 3
>lTotalNumberOfClusters = 4
>
>if empty(lStartPath)
>
> return && cancelled
>
>else
>
> if !GetDiskFreeSpace(lRootPathName, ;
> lSectorsPerCluster, ;
> lBytesPerSector, ;
> lNumberOfFreeClusters, ;
> lTotalNumberOfClusters)

The problem is that you must pass all params by reference, ie put a @ in front of all params. Is not enough to declare them as passed by reference. You need to actually pass them by reference.

Vlad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform