summaryrefslogtreecommitdiff
path: root/win32/test.bmx
diff options
context:
space:
mode:
Diffstat (limited to 'win32/test.bmx')
-rw-r--r--win32/test.bmx38
1 files changed, 38 insertions, 0 deletions
diff --git a/win32/test.bmx b/win32/test.bmx
new file mode 100644
index 0000000..5429281
--- /dev/null
+++ b/win32/test.bmx
@@ -0,0 +1,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) \ No newline at end of file