Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已使用此链接中的以下代码。
从 C# 中的 MIDI 端口获取信号
我想知道我需要添加什么才能获得设备名称列表。我查看了 MSDN 网站,发现我需要实现midiInGetDevCaps及其关联的结构。但是我以前从未真正对 dll 导入和结构做过任何事情,所以我有点迷茫。
midiInGetDevCaps
也许你需要像这样使用它:
MIDIINCAPS caps2; for (uint i = 0; i < Device.iNumDevs1; i++) { Device.midiOutGetDevCaps(i, out caps2, Marshal.SizeOf(output)); comboBox2.Items.Add(caps2.szPname); }