home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code2 / wlpprchg / diskinfo.txt < prev    next >
Text File  |  1992-08-13  |  706b  |  18 lines

  1. Here is the DLL, DiskInfo.DLL. It contains one function, also called
  2. DiskInfo. The declaration is as follows:-
  3.  
  4. Declare Function DiskInfo Lib "DiskInfo.DLL" (ByVal DriveNum%,
  5. ByVal DriveInfo%) As Long
  6.  
  7. DriveNum% is the drive that you want the figures for: 0=Default
  8. Drive, 1=drive A, 2=B, 3=C etc.
  9.  
  10. DriveInfo% is the information you want: 1 = Free Space, 2 = Total 
  11. Space, 3 = Total Clusters, 4 = Available Clusters, 5 = Sectors per 
  12. Cluster, 6 = Bytes per Sector.
  13.  
  14. If you pass an incorrect DriveNum%, the function returns -1, if
  15. there is an error related to DriveInfo% it returns -2. Otherwise
  16. it returns either a number (of clusters/sectors) or a number of Bytes.
  17.  
  18. Ian Taylor 100025,557