SetupDiEnumDeviceInterfaces
枚举USB设备,然后根据类型判断

解决方案 »

  1.   

    就是是用Device Management Functions(setupapi.dll) 去枚举usb设备,然后判断设备是不是你的。
    The SP_DEVICE_INTERFACE_DETAIL_DATA structure provides detailed information about a particular device interface.typedef struct _SP_DEVICE_INTERFACE_DETAIL_DATA {
      DWORD  cbSize;
      TCHAR  DevicePath[ANYSIZE_ARRAY];
    } SP_DEVICE_INTERFACE_DETAIL_DATA, *PSP_DEVICE_INTERFACE_DETAIL_DATA;我想这个应该是你要的:DevicePath :A NULL-terminated string that specifies the device path.
      

  2.   

    貌似
    typedef struct _SP_DEVICE_INTERFACE_DETAIL_DATA {
      DWORD  cbSize;
      TCHAR  DevicePath[ANYSIZE_ARRAY];
    } SP_DEVICE_INTERFACE_DETAIL_DATA, *PSP_DEVICE_INTERFACE_DETAIL_DATA;
    没有Endpoint信息哦。LZ要的是Endpoint(pipe)信息吧?