How to get a letter from pendrive

I want to get the literal name of a pendrive or external hard drive connected via USB. Is it possible to get the drive letter. I am using VC ++

+3
source share
1 answer

GetLogicalDriveStrings lists all existing drive letters and GetDriveType can determine if the drive is removable. GetDriveTypehelp suggests using SetupDiGetDeviceRegistryPropertyto make sure that there is only one USB drive.

+4
source

Source: https://habr.com/ru/post/1742073/


All Articles