I\'m trying to open a WinUSB device that is part of a composite device. I have located the correct child device using cfgmgr32, and have its DEVINST number. In order to open
I recommend looking at the get_filename_from_devinst_and_guid function which is part of libusbp.
The basic outline is:
GUID
struct.SetupDiGetClassDevs(guid, NULL, NULL, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT);
to get a list of all the present (connected) devices supporting that device interface GUID.SetupDiEnumDeviceInfo
to iterate through the list until you find the item that matches the DEVINST you already found.SetupDiEnumDeviceInterfaces
to get the list of interfaces for that item. There should only be one entry because you already specified the device interface GUID you are interested in.SetupDiGetDeviceInterfaceDetail
to get SP_DEVICE_INTERFACE_DETAIL_DATA_A
data structure.DevicePath
member of that structure.