Reading Drive Settings (BIOS or Drive List Box) 
Author Message
 Reading Drive Settings (BIOS or Drive List Box)

Part of my program has a window much resembling a file-manager.  I would
like to include a drive bar at the top like Microsoft File Manager
(WINFILE.EXE).  I would need to know if a drive exist, and if so, it's
letter and type of drive (HD, FLOPPY, REMOTE, NET, CD, OPTICAL, ETC.).
This info I guess should be obtained from the BIOS or CMOS configuration,
or a drive list box, which will also be on the same form.  Please e-mail

stopped working...  All help appreciated in advance.  Thanks!!
-Nathan Dorfman




Thu, 02 Oct 1997 03:00:00 GMT  
 Reading Drive Settings (BIOS or Drive List Box)

Quote:

>I would need to know if a drive exist, and if so, it's letter and
>type of drive [...]

The first step could be using the GetDriveType() function to determine
what kind of drive it is:

Delcare Function GetDriveType Lib "KERNEL" (ByVal nDrive As Integer) As Integer

Where the value for nDrive is 0 for A:, 1 for B: and so on. The return value
will either be 2 (removable floppy drive), 3 (fixed hard disk) or 4 (network
drive). A value of 0 indicates that the drive doesn't exist.

-Mike



Thu, 02 Oct 1997 03:00:00 GMT  
 Reading Drive Settings (BIOS or Drive List Box)

Quote:

> Part of my program has a window much resembling a file-manager.  I would
> like to include a drive bar at the top like Microsoft File Manager
> (WINFILE.EXE).  I would need to know if a drive exist, and if so, it's
> letter and type of drive (HD, FLOPPY, REMOTE, NET, CD, OPTICAL, ETC.).
> ...

The VBIT DLL contains a simplified routine call for this:
type$ = SysInfo(DISK_TYPE+driveNumber%)
returning "REMOVABLE", "FIXED", "REMOTE"

There are also several other routines returning detailed information
about disks and files. This package can be found at:

http://www.vestnett.no/~idb/
ftp://ftp.vestnett.no/pub/pro/idb/



Sat, 04 Oct 1997 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Network drives in a drive list box control

2. How to read the hard drives drive no.

3. VB6 - file list box / drive box question - resolving network paths and computer names

4. GSG?9: Remove drive from drive-box

5. Display Drives in List Box

6. Drive List Box control from VB6 to VBA

7. Drive List Box in Access

8. Where are File, Drive, and Directory list boxes?

9. Drive list box

10. Network Neighborhood in Drive List Box ??

11. Drive List Box

12. drive list box question

 

 
Powered by phpBB® Forum Software