The midiOutClose function closes the specified MIDI output device.
MMRESULT midiOutClose(
HMIDIOUT hmo
);
Returns MMSYSERR_NOERROR if successful or an error otherwise. Possible error values include the following:
Value | Description | |
---|---|---|
MIDIERR_STILLPLAYING | Buffers are still in the queue. | |
MMSYSERR_INVALHANDLE | The specified device handle is invalid. | |
MMSYSERR_NOMEM | The system is unable to load mapper string description. |
If there are output buffers that have been sent by using the midiOutLongMsg function and have not been returned to the application, the close operation will fail. To mark all pending buffers as being done, use the midiOutReset function.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in mmsystem.h.
Import Library: Use winmm.lib.
Musical Instrument Digital Interface (MIDI) Overview, MIDI Functions, midiOutLongMsg, midiOutReset