Exemplo n.º 1
0
        /// <summary>
        /// Gets the input device capabilities.
        /// </summary>
        /// <param name="deviceID">
        /// The device Identifier.
        /// </param>
        /// <exception cref="InputDeviceException">
        /// Thrown if an error occurred while retrieving the input device
        /// capabilities.
        /// </exception>
        /// <returns>
        /// The Midi intput device's capabilities.
        /// </returns>
        public static MidiInCaps GetCapabilities(int deviceID)
        {
            MidiInCaps caps = new MidiInCaps();

            ThrowOnError(midiInGetDevCaps(deviceID, ref caps,
                                          Marshal.SizeOf(caps)));

            return(caps);
        }
Exemplo n.º 2
0
 private static extern int midiInGetDevCaps(int handle, 
     ref MidiInCaps caps, int sizeOfmidiInCaps);
Exemplo n.º 3
0
 private static extern int midiInGetDevCaps(int handle,
                                            ref MidiInCaps caps, int sizeOfmidiInCaps);
Exemplo n.º 4
0
        /// <summary>
        /// Gets the input device capabilities.
        /// </summary>
        /// <param name="deviceID">
        /// The device Identifier.
        /// </param>
        /// <exception cref="InputDeviceException">
        /// Thrown if an error occurred while retrieving the input device
        /// capabilities.
        /// </exception>
        /// <returns>
        /// The Midi intput device's capabilities.
        /// </returns>
        public static MidiInCaps GetCapabilities(int deviceID)
        {
            MidiInCaps caps = new MidiInCaps();

            ThrowOnError(midiInGetDevCaps(deviceID, ref caps,
                Marshal.SizeOf(caps)));

            return caps;
        }