summaryrefslogtreecommitdiff
path: root/win32.mod/noddybox.win32.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2005-10-16 12:49:25 +0000
committerIan C <ianc@noddybox.co.uk>2005-10-16 12:49:25 +0000
commit8a661752eefd670c32e9122ac60a70ceeb701b4a (patch)
treeb5e4b14fb753238b74b300a4a7eeb92d5300835e /win32.mod/noddybox.win32.c
parent7bbc44c79a2f7a745584106cddaa28c052e26d25 (diff)
Added win32 module
Diffstat (limited to 'win32.mod/noddybox.win32.c')
-rw-r--r--win32.mod/noddybox.win32.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/win32.mod/noddybox.win32.c b/win32.mod/noddybox.win32.c
new file mode 100644
index 0000000..5968416
--- /dev/null
+++ b/win32.mod/noddybox.win32.c
@@ -0,0 +1,29 @@
+#include <windows.h>
+
+int W32GetLogicalDrives_C(void)
+{
+ return GetLogicalDrives();
+}
+
+int W32GetDriveType_C(const char *root)
+{
+ switch(GetDriveType(root))
+ {
+ case DRIVE_UNKNOWN:
+ return 0;
+ case DRIVE_NO_ROOT_DIR:
+ return 1;
+ case DRIVE_REMOVABLE:
+ return 2;
+ case DRIVE_FIXED:
+ return 3;
+ case DRIVE_REMOTE:
+ return 4;
+ case DRIVE_CDROM:
+ return 5;
+ case DRIVE_RAMDISK:
+ return 6;
+ default:
+ return 0;
+ }
+}