I've used the following code from this link.
http://stackoverflow.com/questions/1991159/getting-signals-from-a-midi-port-in-c/2024835%232024835
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 im a bit lost.