My c# application must use multiple identical USB MIDI interfaces which are all from the same manufacturer.
In device manager, all devices appear with the same driver name / CLSID - only the PNPDeviceID is different. When I list all MIDI inputs / outputs (using MIDI-dot-net), they appear as follows:
- ACME-MIDI: Port 1
- 1- ACME-MIDI: Port 1
- 2- ACME-MIDI: Port 1
Unfortunately, those names are not always the same for the same device. The ports of device 1 appear sometimes as "ACME-MIDI: Port 1" and sometimes as "1-ACME: Port 1" (they change e.g. after a reboot).
I have used different ways trying to find what name belongs to what device (SetupDi, WMI, Win32_PnPSignedDriver, ...) but I either get the device ID OR the port names it reports, but I'm unable to find the reported MIDI port name (ACME-MIDI: Port n) using the device id or driver key.
Any suggestions?
Update
I'm still looking for a solution to list the Input / Output ports of a MIDI USB interface on a given port (e.g. using Windows API). Seems like this is quite tricky, that's why I start a bounty on this.