Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetDiskFreeSpace not working
Message
From
05/12/1997 21:11:52
 
 
To
05/12/1997 12:14:08
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00064049
Message ID:
00064215
Views:
21
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform