Corresponding to the drive letter in my computer is a hard disk or a U disk.

xiaoxiao2021-03-06  54

For (tchar Cletter = _T ('c'); Cletter <= _t ('Z'); Cletter ) {CSTRING SDRIVE (Cletter); SDRIVE = _T (": //"); if (getDriveType (SDrive) = = Drive_removable) {m_udisk = SDrive; // MessageBox (m_udisk, "uDisk:", 0); Break;}} / *

case DRIVE_NO_ROOT_DIR: return; case DRIVE_REMOVABLE: // :: AfxMessageBox (DriveName); break; case DRIVE_FIXED: // :: AfxMessageBox ( "fixed hard drive"); break; case DRIVE_REMOTE: // :: AfxMessageBox ( "This is the network Drive "); Return; Case Drive_cdrom: // :: AfxMessageBox (" This is a CD Drive "); return; * /

转载请注明原文地址:https://www.9cbs.com/read-114800.html

New Post(0)