public Form1() { int handle = 0; var numDevs = Midi.midiOutGetNumDevs(); MidiOutCaps myCaps = new MidiOutCaps(); var res = Midi.midiOutGetDevCaps(0, ref myCaps, (UInt32)Marshal.SizeOf(myCaps)); res = Midi.midiOutOpen(ref handle, 0, null, 0, 0); res = Midi.midiOutShortMsg(handle, 0x000019C0); res = Midi.midiOutShortMsg(handle, 0x007F3C90); res = Midi.midiOutClose(handle); InitializeComponent(); updateMinMajComboText(); updateNote(); }
public static extern int midiOutGetDevCaps(Int32 uDeviceID, ref MidiOutCaps lpMidiOutCaps, UInt32 cbMidiOutCaps);