1

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.

Community
  • 1
  • 1
Matt Roberts
  • 59
  • 1
  • 7

1 Answers1

4

Maybe you need use it like this:

MIDIINCAPS caps2;

for (uint i = 0; i < Device.iNumDevs1; i++)
{
    Device.midiOutGetDevCaps(i, out caps2, Marshal.SizeOf(output));
    comboBox2.Items.Add(caps2.szPname);
}
takrl
  • 6,356
  • 3
  • 60
  • 69
Rinaldi
  • 84
  • 1
  • 3