interface type for a drive letter
问题 Any suggestions on getting the device interface type for a volume, given its drive letter (e.g. G:)? Specifically, am looking for a solution that doesn't depend on WMI. Thank you. 回答1: You can use GetDriveType to get the basic interface type(ie: removable device, CDROM, RAMDisk) for the drive letter, also see the final comment at the bottom of that page for a little more info on removable devices. Also check out SetupDiGetDeviceRegistryProperty and DeviceIoControl Her is the best example I