BASS.NET API for the Un4seen BASS Audio LibraryMidiMIDI_OutGetDevCaps Method BASS.NET API for the Un4seen BASS Audio Library
Queries a specified MIDI output device to determine its capabilities.

Namespace: radio42.Multimedia.Midi
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.13.0
Syntax

public static MIDIError MIDI_OutGetDevCaps(
	int deviceID,
	MIDI_OUTCAPS caps
)

Parameters

deviceID
Type: SystemInt32
Identifier of the MIDI output device. The device identifier varies from zero to one less than the number of devices present.
caps
Type: radio42.Multimedia.MidiMIDI_OUTCAPS
An instance of the MIDI_OUTCAPS class that is filled with information about the capabilities of the device.

Return Value

Type: MIDIError
Returns 0 if successful or an error code otherwise. For possible error values see MIDIError.
Remarks

To determine the number of MIDI output devices present on the system, use the MIDI_OutGetNumDevs function.
Examples

List all Midi output port devices:
VB
Dim count As Integer = Midi.MIDI_OutGetNumDevs()
Dim outCaps As New MIDI_OUTCAPS()
Dim i As Integer
For i = 0 To count-1
  Midi.MIDI_OutGetDevCaps(i, outCaps)
  If outCaps.IsMidiPort Then
    Console.WriteLine(outCaps.name)
  End If
Next i
int count = Midi.MIDI_OutGetNumDevs();
MIDI_OUTCAPS outCaps = new MIDI_OUTCAPS();
for (int i=0; i<count; i++)
{
  Midi.MIDI_OutGetDevCaps(i, outCaps);
  if (outCaps.IsMidiPort)
    Console.WriteLine( outCaps.name );
}
See Also

Reference