不太容易,如果是简单的存储卡还可以 ,通过GetDriveType 获取可移动设备<br>要是usb鼠标,光驱 ,软驱 ,摄像头 或是特殊的外挂设备!!!<br><br>result = GetDriveType(drive);<br> <br> if (result == DRIVE_REMOVABLE)<br> cout << "可移动设备" ;<br> else if (result == DRIVE_FIXED)<br> cout << "硬盘";<br> else if (result == DRIVE_REMOTE)<br> cout << "网络驱动器" ;<br> else if (result == DRIVE_CDROM )<br> cout << " 光驱";<br> else if (result == DRIVE_RAMDISK)<br> cout << "Ram Disk";<br> else if (result == DRIVE_UNKNOWN)<br> cout << "未知的设备";