【问题标题】:Get device interface from SetupDiGetClassDevs从 SetupDiGetClassDevs 获取设备接口
【发布时间】:2011-02-15 10:43:11
【问题描述】:

是否有可能从SetupDiGetClassDevs 函数或相关函数以某种方式获取与CreateFile 一起使用的接口字符串?我必须扫描连接到计算机的设备。

【问题讨论】:

    标签: c++ windows winapi device


    【解决方案1】:

    对于从SetupDiGetClassDevs返回的每个设备,您需要使用SetupDiEnumDeviceInterfaces枚举设备接口,然后使用SetupDiGetDeviceInterfaceDetail检索详细数据。由SetupDiGetDeviceInterfaceDetail 填充的SP_DEVICE_INTERFACE_DETAIL_DATA 结构包含正确的CreateFile 路径。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-09-19
      • 1970-01-01
      • 2013-10-07
      • 2023-03-30
      • 2019-09-09
      相关资源
      最近更新 更多