- wxString path, name;
- path.Printf(wxT("%c:\\"), 'A' + i);
- name.Printf(wxT("%c:"), 'A' + i);
-
+ const wxString path = wxFileName::GetVolumeString(
+ 'A' + i, wxPATH_GET_SEPARATOR);
+ const wxString name = wxFileName::GetVolumeString(
+ 'A' + i, wxPATH_NO_SEPARATOR);
+
+ // Note: If _filesys is unsupported by some compilers,
+ // we can always replace it by DosQueryFSAttach
+ char filesysname[20];
+#ifdef __WATCOMC__
+ ULONG cbBuffer = sizeof(filesysname);
+ PFSQBUFFER2 pfsqBuffer = (PFSQBUFFER2)filesysname;
+ APIRET rc = ::DosQueryFSAttach(name.fn_str(),0,FSAIL_QUERYNAME,pfsqBuffer,&cbBuffer);
+ if (rc != NO_ERROR)
+ {
+ filesysname[0] = '\0';
+ }
+#else
+ _filesys(name.fn_str(), filesysname, sizeof(filesysname));
+#endif
+ /* FAT, LAN, HPFS, CDFS, NFS */