I want to extract the manufacturer string and product string for a specific Mass storage USB device let's say C:. I am able to extract manufacturer string and product string by enumerating all USB devices but now I don't know how to associate specific USB drive to manufacturer ID and Product ID. I am on Windows platform and using Visual Studio for development.

Any help would be highly appreciated.

Farooq-

有帮助吗?

解决方案

Use this sample to find the corresponding device node for your mounted drive: http://www.codeproject.com/KB/system/RemoveDriveByLetter.aspx

Then, query the device using SetupDiGetDeviceProperty (using the SPDRP_Xxx identifiers as defined in Setupapi.h).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top