home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / ProjectX1_562922192002.psc / ModulesCode / modCodeX8.bas < prev    next >
Encoding:
BASIC Source File  |  1997-02-19  |  761 b   |  24 lines

  1. Attribute VB_Name = "modCodeX8"
  2.  
  3. Private Declare Function GetDiskFreeSpaceEx Lib "kernel32" Alias "GetDiskFreeSpaceExA" (ByVal lpRootPathName As String, lpFreeBytesAvailableToCaller As Currency, lpTotalNumberOfBytes As Currency, lpTotalNumberOfFreeBytes As Currency) As Long
  4. Public Function TvGetFreeDisk(DiskD As String) As Long
  5. '-----------------------------------
  6. '-    TvGetFreeDisk()
  7. '-
  8. '- It'll return the free bytes on a drive
  9. '-
  10. '-     By T-Virus Creations
  11. '- http://www.tvirusonline.be
  12. '- email: tvirus4ever@yahoo.co.uk
  13. '-
  14. '-----------------------------------
  15.     Dim r As Long
  16.     Dim RPN As String
  17.     Dim TFB As Currency
  18.     RPN = DiskD
  19.     GetDiskFreeSpaceEx RPN, 0, 0, TFB
  20.  
  21. TvGetFreeDisk = TFB * 10000 ' bytes
  22.  
  23. End Function
  24.