January 1, 2005

WinTask - GetDriveType

'
' GetDriveType
'
' Author: Joe Strazzere
'

dim a as unsigned
dr$=inputbox$("Enter the drive","GetDriveType","C:")
a = External("kernel32","GetDriveTypeA",dr$)
Select Case a
case 1
  msgbox("Drive "+dr$+" was not found!",0,"GetDriveType")
case 2
  msgbox("Drive "+dr$+" is a removable drive",0,"GetDriveType")
case 3
  msgbox("Drive "+dr$+" is a fixed drive",0,"GetDriveType")
case 4
  msgbox("Drive "+dr$+" is a network drive",0,"GetDriveType")
case 5
  msgbox("Drive "+dr$+" is a CD-ROM drive",0,"GetDriveType")
case 6
  msgbox("Drive "+dr$+" is a RAM drive",0,"GetDriveType")
case else
  msgbox("I just don't know!",0,"GetDriveType")
endselect