Copyright © 2013-2014 MultiMedia Soft

MidiDevices.InputOutputConnect method

Previous pageReturn to chapter overviewNext page



Establishes a direct connection between the given MIDI input device and the given MIDI output device. After the connection is established, the connection can be terminated through the MidiDevices.InputOutputDisconnect method.


In order to establish the connection, both involved input and output devices must have been previously opened through the MidiDevices.Open method.


When the connection is established, each MIDI message incoming from the MIDI input device will be automatically forwarded to the MIDI output device.


For further details about the use of MIDI devices see the MidiDevices object section and the How to manage MIDI devices tutorial.





[Visual Basic]

control.MidiDevices.InputOutputConnect (

nInputDeviceUniqueId as Integer,

nOutputDeviceUniqueId as Integer

) as enumDjcErrorCodes



short control.MidiDevices.InputOutputConnect (

short nInputDeviceUniqueId,

short nInputDeviceUniqueId










The unique identifier of the MIDI input device returned by a previous call to the MidiDevices.Open method.


The unique identifier of the MIDI output device returned by a previous call to the MidiDevices.Open method.



Return value






enumDjcErrorCodes.ERR_DJC_NOERROR (0)

The call was successful.

Negative value

An error occurred: see the LastError property for further error details or for a list of the possible error values.