I've used the following code from this link.
Getting signals from a MIDI port in C#
I'm wondering what I need to add to able to get a list of device names.
I've looked the MSDN website and found I need to implement midiInGetDevCaps
and its a associated struct. But I've never really done anything with dll imports and structs before so I'm a bit lost.