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
        /// <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.º 3
0
 private static extern int midiInGetDevCaps(int handle,
                                            ref MidiInCaps caps, int sizeOfmidiInCaps);
Exemplo n.º 4
0
 private static extern int midiInGetDevCaps(int handle, 
     ref MidiInCaps caps, int sizeOfmidiInCaps);