简体   繁体   English

USB大容量存储设备的制造商字符串和产品字符串

[英]Manufacturer String and Product string for a USB Mass storage device

I want to extract the manufacturer string and product string for a specific Mass storage USB device let's say C:. 我想提取特定的Mass Storage USB设备的制造商字符串和产品字符串,假设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. 我可以通过枚举所有USB设备来提取制造商字符串和产品字符串,但是现在我不知道如何将特定的USB驱动器与制造商ID和产品ID关联。 I am on Windows platform and using Visual Studio for development. 我在Windows平台上,并使用Visual Studio进行开发。

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 使用此示例为您已安装的驱动器找到相应的设备节点: http : //www.codeproject.com/KB/system/RemoveDriveByLetter.aspx

Then, query the device using SetupDiGetDeviceProperty (using the SPDRP_Xxx identifiers as defined in Setupapi.h). 然后,使用SetupDiGetDeviceProperty (使用Setupapi.h中定义的SPDRP_Xxx标识符)查询设备。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM