-------------------------------------------------------------
        BSDRVINF.DLL  from BitSoft Utility Software
-------------------------------------------------------------

                    Alex Homer
                    16 Birkinstyle Avenue
                    Stonebroom
                    Derbyshire
                    DE55 6LF  UK

                    Tel/Fax: 0177 387 4661

                    100416,2030 @ compuserve.com

-------------------------------------------------------------

Most high-level languages, and the Windows API itself, provide
ways to obtain the amount of free space on a disc drive. But
reading other details such as the cluster size (the size of
the smallest allocation unit), or more importantly the total 
size of a drive, is more difficult.

BSDRVINFO.DLL provides a simple function which returns this
information for any logical drive given the drive number. The
function is named DriveInfo and indexed 1 in the DLL.

The syntax of the function is as follows:

Function DriveInfo (DriveNum: Integer; var ClusterSize,
                    DriveSize, DriveFree : LongInt) : Integer


DriveNum - 16 bit signed integer
           0 = current drive
           1 = drive A:
           2 = drive B:   etc..

ClusterSize, DriveSize, DriveFree - 32-bit signed integer
	                            values returned in bytes

Return Value - 16-bit signed integer
               0 (false) = not a valid drive   
               Non-zero = success

-------------------------------------------------------------

Example use in Visual Basic.


In declarations section - (all on one line) :

Declare Function DriveInfo% Lib "bsdrvinf.dll" 
    (ByVal DriveNum%, ClusterSize&, DriveSize&, DriveFree&)


To obtain values:

   Dim csize&, dsize&, dfree& 
   Dim dvnum%, ok%
   dvnum = Asc("C") - 64
   ok = DriveInfo(dvnum, csize, dsize, dfree)
   If ok Then
      ' Got values 
   Else
      ' Not a valid drive
   End If

-------------------------------------------------------------

Distributing BSDRVINF.DLL

You may freely use BSDRVINF.DLL in your own programs. If you 
intend to distribute programs including the DLL, a one-off 
payment of 25 (GBP) will secure an unlimited distribution 
licence.

-------------------------------------------------------------
