GetLogicDrivers()
Findfile
...
记不清了,查CSDN吧

解决方案 »

  1.   

    得到盘符代码: int ch, drive, curdrive;
       static char path[_MAX_PATH];   /* Save current drive. */
       curdrive = _getdrive();   strMsg+="Available drives are: \n";   /* If we can switch to the drive, it exists. */
       for( drive = 1; drive <= 26; drive++ )
          if( !_chdrive( drive ) )
      {
      strTempMsg.Format("%c:\n", drive + 'A' - 1 );
      strMsg+=strTempMsg;
      }      AfxMessageBox(strMsg);
      

  2.   

    ::GetLogicalDriveStrings, 文件先是::FindFirstFile, 然后::FindNextFile