private static extern MMRESULT midiInGetDevCaps(IntPtr uDeviceID, ref MIDIINCAPS caps, uint cbMidiInCaps);
public static MMRESULT midiInGetDevCaps(uint deviceId, ref MIDIINCAPS caps) => midiInGetDevCaps(new IntPtr(deviceId), ref caps, (uint)Marshal.SizeOf <MIDIINCAPS>());