Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

midiInClose function

The midiInClose function closes the specified MIDI input device.

Syntax


MMRESULT midiInClose(
   HMIDIIN hMidiIn
);

Parameters

hMidiIn

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

Return value

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

Return codeDescription
MIDIERR_STILLPLAYING

Buffers are still in the queue.

MMSYSERR_INVALHANDLE

The specified device handle is invalid.

MMSYSERR_NOMEM

The system is unable to allocate or lock memory.

 

Remarks

If there are input buffers that have been sent by using the midiInAddBuffer function and have not been returned to the application, the close operation will fail. To return all pending buffers through the callback function, use the midiInReset function.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Mmsystem.h (include Windows.h)

Library

Winmm.lib

DLL

Winmm.dll

See also

MIDI Functions

 

 

Community Additions

Show:
© 2015 Microsoft