This message is sent to a MIDI input device to clean up the preparation performed by the MIDM_PREPARE message.
DWORD dwParam1
Specifies a far pointer to MIDIHDR structure identifying the data buffer.
DWORD dwParam2
Specifies the size of the MIDIHDR structure.
The return value is an error code, or zero (MMSYSERR_NOERROR) if the operation is successful. Possible error codes are:
MMSYSERR_NOTENABLED
The driver failed to load or initialize.
MIDIERR_STILLPLAYING
The specified data buffer is still in the input queue.
Driver support for this message is optional. If a driver supports the MIDM_PREPARE message, then it must also support MIDM_UNPREPARE.
The default response for this message is to return MMSYSERR_NOTSUPPORTED. In this case, MMSYSTEM will clean up the preparation previously done on the memory buffer. If a driver performs the preparation itself, it must clean up the preparation and reset the MHDR_PREPARED flag in the dwFlags field of the MIDIHDR structure. If a data buffer has not been prepared, MMSYSERR_NOERROR should be returned.