我正在尝试在 WinMM.dll 中为 MIDI 函数编写一个包装库,但我遇到了 MIDI 长消息的问题。我在 PIvnoke.net 中找到了这个(我自己添加了第一行):
[StructLayout(LayoutKind.Sequential)]
public struct MIDIHDR
{
IntPtr lpData;
int dwBufferLength;
int dwBytesRecorded;
IntPtr dwUser;
int dwFlags;
MIDIHDR lpNext;
IntPtr reserved;
int dwOffset;
IntPtr dwReserved;
}
但是编译时出现错误:
错误 1 类型为“WinMMM.MidiWrapper.MIDIHDR”的结构成员“WinMMM.MidiWrapper.MIDIHDR.lpNext”导致结构布局 C:\Users\Alex\Documents\Visual Studio 2010\Projects\WinMMM\WinMMM\MidiWrapper 出现循环。 cs 219 21 赢MMM
我正在使用 Visual Studio Ultimate 2010,我正在制作 C# 类库,任何帮助将不胜感激!