MIDM_STOP

Sent to a MIDI input device driver to end recording of incoming MIDI data.

MMSYSERR_NOTENABLED The driver failed to load or initialize.

DWORD dwParam1
Unused.
DWORD dwParam2
Unused.

If there is a buffer in the input queue that contains any system-exclusive data, the driver should set the MHDR_DONE bit and clear the MHDR_INQUEUE bit in the dwFlags field of the MIDIHDR structure identifying the buffer. It should then record the number of actual bytes recorded in the dwBytesRecorded field and return the buffer to the client by sending a MIM_LONGDATA message with the DriverCallback function. Any empty buffers should remain in the queue.

If a buffer in the input queue contains system-exclusive data but the buffer is incomplete, the driver should follow the same procedure outlined in the preceding paragraph (including setting the dwBytesRecorded field), but should return the buffer to the client using the MIM_LONGERROR message, not MIM_LONGDATA.

If this message is received and recording is already stopped, the driver should return MMSYSERR_NOERROR.