>Hello,
>
>We have a legacy application running under FoxPro 2.5 with the clients running Windows 95 or Windows NT 4.0. In some situations, they are working with compressed (ZIP) databases that are often copied to the local PC drive for extra speed and write capability. Our application makes use of the DISKSPACE() function to determine if there will be enough free space on a given drive before attempting to load the data.
>
>Now, the problem (as I've known for a while) is that this function will not reliably return the correct free space. The maximum it returns is 1gb of free space and compressed data fitting on 650MB CD-ROM will unexpand to much more than this in many cases.
>
>Has anyone written an FLL or alternative FoxPro function that will return at minimum 2gb free (if there is at least that much free). One solution I have so far is to call the WINAPI32 function GetDiskFreeSpace() from an FLL. I am able to call it from VFP 5.0 using the DECLARE statement but this feature doesn't seem to exist in 2.5. :-/
>
There's a Win16 equivalent to this, which would be accessible using FoxTools REGFN() and CALLFN() (I don't know what the systax would be IAC for the Win16 API call IAC) and you're stuck with Win16, not Win32 IAC with FPW2.5/2.6, and the Win16 API call is the underlying basis for DISKSPACE. Your ownly recourse will be to find a function that returns the number of free disk clusters (SYS(2022) will return the cluster size) and then do the math, since the minimum cluster size would be at least 512 bytes (if an NTFS disk volume were involved) and under FAT it would be 2K or larger...
>Thanks in advance!