Skip to content

Latest commit

 

History

History
112 lines (91 loc) · 3.02 KB

nf-mmeapi-midiconnect.md

File metadata and controls

112 lines (91 loc) · 3.02 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:mmeapi.midiConnect
midiConnect function (mmeapi.h)
The midiConnect function connects a MIDI input device to a MIDI thru or output device, or connects a MIDI thru device to a MIDI output device.
_win32_midiConnect
midiConnect
midiConnect function [Windows Multimedia]
mmeapi/midiConnect
multimedia.midiconnect
multimedia\midiconnect.htm
Multimedia
24ee806a-f8a2-470e-8737-e4e5216f2705
12/05/2018
_win32_midiConnect, midiConnect, midiConnect function [Windows Multimedia], mmeapi/midiConnect, multimedia.midiconnect
mmeapi.h
Windows.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
Winmm.lib
Winmm.dll
Windows
19H1
midiConnect
mmeapi/midiConnect
c++
APIRef
kbSyntax
DllExport
Winmm.dll
API-MS-Win-mm-mme-l1-1-0.dll
winmmbase.dll
midiConnect

midiConnect function

-description

The midiConnect function connects a MIDI input device to a MIDI thru or output device, or connects a MIDI thru device to a MIDI output device.

-parameters

-param hmi

Handle to a MIDI input device or a MIDI thru device. (For thru devices, this handle must have been returned by a call to the midiOutOpen function.)

-param hmo

Handle to the MIDI output or thru device.

-param pReserved

Reserved; must be NULL.

-returns

Returns MMSYSERR_NOERROR if successful or an error otherwise. Possible error values include the following.

Return code Description
MIDIERR_NOTREADY
Specified input device is already connected to an output device.
MMSYSERR_INVALHANDLE
Specified device handle is invalid.

-remarks

After calling this function, the MIDI input device receives event data in an MIM_DATA message whenever a message with the same event data is sent to the output device driver.

A thru driver is a special form of MIDI output driver. The system will allow only one MIDI output device to be connected to a MIDI input device, but multiple MIDI output devices can be connected to a MIDI thru device. Whenever the given MIDI input device receives event data in an MIM_DATA message, a message with the same event data is sent to the given output device driver (or through the thru driver to the output drivers).

-see-also

MIDI Functions