summaryrefslogtreecommitdiff
path: root/win32/test.bmx
blob: 5429281ab4c18b7fbb10f5d5b25d0059e8e32141 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
' $Id$

Import noddybox.win32
Strict

Local drives:Int=W32GetLogicalDrives()

For Local b:Int=0 To 27
	Local m:Int=1 Shl b

	If (drives &m)=m
		Local root:String=Chr(65+b)+":"
		Local t:String
		
		Select W32GetDriveType(root)
			Case DRIVETYPE_UNKNOWN
				t="Unknown"
			Case DRIVETYPE_NO_ROOT_DIR
				t="No root dir"
			Case DRIVETYPE_REMOVABLE
				t="Removable"
			Case DRIVETYPE_FIXED
				t="Fixed"
			Case DRIVETYPE_REMOTE
				t="Remote"
			Case DRIVETYPE_CDROM
				t="CDROM"
			Case DRIVETYPE_RAMDISK
				t="RAM DISK"
			Default
				t="*** Bad return ***"
		End Select
		
		Print root + " -- " + t
	EndIf
Next

Print "Drive mask="+Bin(drives)