I have an application that talks to MIDI input and output devices. With this application, users often connect several of the same MIDI device to the host computer. My application needs to save and restore a unique identifier for the device so that it can be restored as best as possible. On OS X, multiple devices of the same type is not a problem as users can rename individual devices. On Windows, this is not possible, so the only way to distinguish between devices of the same type is the port index. So, questions:
1) Is the port index a reliable way of distinguishing between multiple devices of the same type? In other words, assuming that the user does not change their USB MIDI device connections in any way, will devices restore with the same port numbers?
2) Is there a better way?