static int GetUdisk(vector <CString> &udisk) { CHAR szDriveStrings[1024]; PCHAR szDriver; memset(szDriveStrings, 0, sizeof(szDriveStrings)); GetLogicalDriveStrings(sizeof(szDriveStrings), szDriveStrings); szDriver = szDriveStrings; while (szDriver[0] != ‘\0‘) { if (GetDriveType(szDriver) == DRIVE_REMOVABLE) { udisk.push_back(CString(szDriver)); } szDriver += strlen(szDriver) + 1; } return 0; }
windows 获取已插入U盘,布布扣,bubuko.com
时间: 2024-12-29 09:38:41