【问题标题】:midiInGetDevCaps Midi Device NamesmidiInGetDevCaps Midi 设备名称
【发布时间】:2011-02-14 13:49:11
【问题描述】:

我已使用此链接中的以下代码。

Getting signals from a MIDI port in C#

我想知道我需要添加什么才能获得设备名称列表。 我查看了 MSDN 网站,发现我需要实现 midiInGetDevCaps 及其关联结构。但我以前从未真正对 dll 导入和结构做过任何事情,所以我有点迷茫。

【问题讨论】:

    标签: c# midi


    【解决方案1】:

    也许你需要这样使用它:

    MIDIINCAPS caps2;
    
    for (uint i = 0; i < Device.iNumDevs1; i++)
    {
        Device.midiOutGetDevCaps(i, out caps2, Marshal.SizeOf(output));
        comboBox2.Items.Add(caps2.szPname);
    }
    

    【讨论】:

    • 如果对您有帮助,别忘了将答案标记为正确 :)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多