midiInClose

Syntax

WORD midiInClose(hMidiIn)

This function closes the specified MIDI input device.

Parameters

HMIDIIN hMidiIn

Specifies a handle to the MIDI input device. If the function is successful, the handle is no longer valid after this call.

Return Value

Returns zero if the function was successful. Otherwise, it returns an error number. Possible error returns are:

MMSYSERR_INVALHANDLE

Specified device handle is invalid.

MIDIERR_STILLPLAYING

There are still buffers in the queue.

Comments

If there are input buffers that have been sent with midiInAddBuffer and haven't been returned to the application, the close operation will fail. Call midiInReset to mark all pending buffers as being done.

See Also

midiInOpen, midiInReset