Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The midiOutUnprepareHeader function cleans up the preparation performed by the midiOutPrepareHeader function.
Syntax
MMRESULT midiOutUnprepareHeader(
HMIDIOUT hmo,
LPMIDIHDR pmh,
UINT cbmh
);
Parameters
hmo
Handle to the MIDI output device. This parameter can also be the handle of a MIDI stream cast to HMIDIOUT.
pmh
Pointer to a MIDIHDR structure identifying the buffer to be cleaned up.
cbmh
Size, in bytes, of the MIDIHDR structure.
Return value
Returns MMSYSERR_NOERROR if successful or an error otherwise. Possible error values include the following.
Return code | Description |
---|---|
|
The buffer pointed to by lpMidiOutHdr is still in the queue. |
|
The specified device handle is invalid. |
|
The specified pointer or structure is invalid. |
Remarks
This function is complementary to the midiOutPrepareHeader function. You must call midiOutUnprepareHeader before freeing the buffer. After passing a buffer to the device driver with the midiOutLongMsg function, you must wait until the device driver is finished with the buffer before calling midiOutUnprepareHeader.
Unpreparing a buffer that has not been prepared has no effect, and the function returns MMSYSERR_NOERROR.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | mmeapi.h (include Windows.h) |
Library | Winmm.lib |
DLL | Winmm.dll |