My C # application should use several identical USB MIDI interfaces, which all belong to the same manufacturer.
In the device manager, all devices are displayed with the same driver name / CLSID - only PNPDeviceID is different. When I list all the MIDI inputs / outputs (using MIDI-dot-net), they look like this:
- ACME-MIDI: Port 1
- 1- ACME-MIDI: port 1
- 2- ACME-MIDI: Port 1
Unfortunately, these names are not always the same for the same device. The ports of device 1 sometimes appear as "ACME-MIDI: port 1", and sometimes as "1-ACME: port 1" (they change, for example, after a reboot).
I used different methods to find out which name belongs to the device (SetupDi, WMI, Win32_PnPSignedDriver, ...), but I either get the device ID OR the names of the ports that it reports, but I can not find the MIDI port name (ACME-MIDI : Port n) using the device identifier or driver key.
Any suggestions?
Update
I'm still looking for a solution to display the MIDI USB I / O ports on this port (for example, using the Windows API). It seems like it's pretty complicated, so I'm starting the bounty on this.
source share