December 11, 2003
@ 02:50 AM

declare the following in a BAS file:

Declare Function GETDRIVETYPE Lib "Kernel" (ByVal nDrive As Integer) As Integer

You must pass this function the drive number, not a drive letter. Drive numbers always start a 0. For instance, drive A: is drive #0, Drive C: is drive #2.

DRIVETYPE = GETDRIVETYPE(DRIVENUM)

This function returns a 2 for removable drives, 3 for fixed drives or 4 for remote drives. This function will return a 0 if it is passed a drive number that does not exist on the system.

 

Submitted By: David McCarter