Oh sorry, just copied a part of my code, leaving some things in there that doesn't work without the other context.
I'm sure you already figured out these minor changes, but this compiles as-is:
load dll "kernel32.dll",1
a$="c:\"
pSectorsPerCluster = alloc(4)
pBytesPerSector = alloc(4)
pFreeClusters = alloc(4)
pTotalClusters = alloc(4)
Call dll 1,"GetDiskFreeSpaceA",a$,pSectorsPerCluster, pBytesPerSector, pFreeClusters, pTotalClusters
print "Free clusters: "; peek dword(pFreeClusters); " / "; peek dword(pTotalClusters)
print "Sectors per cluster: "; peek dword(pSectorsPerCluster)
print "Sector size: "; peek dword(pBytesPerSector); " bytes"
wait key
Edit: oh yeah, IanM's utility plugin pack is reuired also, if you don't already have that. Just see his signature a few posts up
This version uses only DBP native functions:
load dll "kernel32.dll",1
a$="c:\"
pSectorsPerCluster = make memory(4)
pBytesPerSector = make memory(4)
pFreeClusters = make memory(4)
pTotalClusters = make memory(4)
Call dll 1,"GetDiskFreeSpaceA",a$,pSectorsPerCluster, pBytesPerSector, pFreeClusters, pTotalClusters
print "Free clusters: "; *pFreeClusters; " / "; *pTotalClusters
print "Sectors per cluster: "; *pSectorsPerCluster
print "Sector size: "; *pBytesPerSector; " bytes"
wait key