Copyright © 2013-2015 MultiMedia Soft

MidiDevices.Open method

Previous pageReturn to chapter overviewNext page

Remarks

 

Opens a specific MIDI device installed inside the system and obtains back its unique identifier. An opened device can be close through the MidiDevices.Close method.

 

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

 

 

Syntax

 

[Visual Basic]

control.MidiDevices.Open (

bInput as enumBoolean,

nDeviceIndex as Integer,

nDeviceUniqueId as Integer

) as enumDjcErrorCodes


 

[C++]

short control.MidiDevices.Open (

short bInput,

short nDeviceIndex,

short *nDeviceUniqueId

);


 

Parameter

Description

 

 

bInput

Boolean value that specifies if the open request is related to an input or an output device.

Supported values are the following:

Mnemonic constant

Value

Meaning

BOOL_FALSE

0

The opening request is related to an output device

BOOL_TRUE

1

The opening request is related to an input device

nDeviceIndex

Number representing the zero-based index of the MIDI device. The number of available MIDI devices installed inside the system can be obtained through the MidiDevices.CountGet method.

nDeviceUniqueId

Reference that, on return from the method call, will contain the unique identifier of the MIDI device: this identifier will be used with other methods that will require access to the specific MIDI device.

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred, check the LastError property value in order to get the error code

enumErrorCodes.ERR_NOERROR (0)

The method call was successful