midiInGetDevCaps() public static method

Fills in the capabilities struct for a specific input device.
public static midiInGetDevCaps ( UIntPtr uDeviceID, MIDIINCAPS &caps ) : MMRESULT
uDeviceID System.UIntPtr
caps MIDIINCAPS
return MMRESULT
Example #1
0
 /// <summary>
 /// Private method for constructing the array of MidiInputDevices by calling the Win32 api.
 /// </summary>
 /// <returns></returns>
 private static InputDevice[] MakeDeviceList()
 {
     uint inDevs = Win32API.midiInGetNumDevs();
     InputDevice[] result = new InputDevice[inDevs];
     for (uint deviceId = 0; deviceId < inDevs; deviceId++)
     {
         Win32API.MIDIINCAPS caps = new Win32API.MIDIINCAPS();
         Win32API.midiInGetDevCaps((UIntPtr)deviceId, out caps);
         result[deviceId] = new InputDevice((UIntPtr)deviceId, caps);
     }
     return result;
 }