开发者

midiInGetDevCaps Midi Device Names

开发者 https://www.devze.com 2022-12-29 00:40 出处:网络
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 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.


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);
}
0

精彩评论

暂无评论...
验证码 换一张
取 消