Get drives information
By: John A. Nyhart Date: 19/02/1995
File:

getdriveinfo.zip

Size:

1.53 KB

Download now!

This sub will detect information for all drives installed in your system.

Syntax

getDriveInfo ()

Parameters

N/A

Type of data

N/A

Returns

N/A

-

After execution all data will be stored in the vararyDriveInfo. Its dimensions are (26, 11): 26 for each letter (A-Z), 11 are the pieces of information returned. They are:

     01. Indicates if the drive for this letter exists.
           True if exists, False if not.
     02. Drive letter
     03. Drive type:
           2=Floppy, 3=Fixed Disk, 4=Network Disk, 5=CD-ROM drive
     04. Number of sectors.
     05. Bytes per sector.
     06. Free sectors.
     07. Total clusters.
     08. Total bytes.
     09. Free bytes.
     10. Percent of free bytes.
     11. Volume label.

The function is contained in a module. You can cut and paste it in any program of yours.

Click Here!


Visual Basic Programming Zone is a website by Lorenzo Dalla Vecchia.
Webmaster's e-mail: webmaster@vbprogzone.cjb.net
Hosted by InWind: www.inwind.it