private static extern MMRESULT midiOutGetDevCaps(IntPtr uDeviceID, ref MIDIOUTCAPS lpMidiOutCaps, uint cbMidiOutCaps);
public static MMRESULT midiOutGetDevCaps(uint deviceId, ref MIDIOUTCAPS caps) => midiOutGetDevCaps(new IntPtr(deviceId), ref caps, (uint)Marshal.SizeOf <MIDIOUTCAPS>());