Sent to a MIDI output device driver to output a MIDI data block containing one or more MIDI events, including system-exclusive events. If the data block contains more than one MIDI event, the events are packed into the data block with no padding.
MMSYSERR_NOTENABLED | The driver failed to load or initialize. |
MIDIERR_UNPREPARED | The data block has not been prepared. |
MIDIERR_NOTREADY | The hardware is busy with other data. |
The driver should first check the MHDR_PREPARED bit in the dwFlags field of the MIDIHDR structure. If the bit is not set, the driver should return MIDIERR_UNPREPARED. The driver should clear the MHDR_DONE bit and set the MHDR_INQUEUE bit and place the data block in its output queue. Then the driver should return control to the client by returning MMSYSERR_NOERROR.
Once the data block has been output, the driver should set the MHDR_DONE bit and clear the MHDR_INQUEUE bit before notifying the client by using DriverCallback to send a MOM_DONE message.
The driver can choose not to return until the message has been sent to the output device, or the driver can return immediately and output the MIDI data in the background. The driver should maintain MIDI status across multiple MODM_DATA and MODM_LONGDATA calls.
MODM_DATA