MMSYSTEM sends the
MODM_DATA message to the modMessage function of a MIDI output driver when the client wants to make a single MIDI event available as output.
DWORD modMessage( UINT uDeviceID, UINT uMSG, DWORD_PTR dwUser, DWORD_PTR dwParam1, DWORD_PTR dwParam2 );
Specifies the ID of the target device. Device IDs are sequential and have an initial value of zero and a final value that is equal to one less than the number of devices that the driver supports.
WINMM sets this parameter to MODM_DATA when it calls modMessage to process this message.
Use this parameter to return instance data to the driver. Drivers that support multiple clients can use this instance data to track the client that is associated with the message.
Specifies the MIDI event that will be available at the output. The low-order byte is the first byte of the event.
If the operation is successful, modMessage returns MMSYSERR_NOERROR. Otherwise, it returns one of the error messages in the following table.
The driver failed to load or initialize.
The MIDI hardware is busy processing other data.
This message is used to make all MIDI events available as output, except system-exclusive events. System-exclusive events are communicated with the MODM_LONGDATA message. MIDI events that are communicated with
MODM_DATA can be one, two, or three bytes long. The driver must parse the event to determine how many bytes to transfer. Unused bytes are not guaranteed to be zero.
The driver developer can develop a driver to not return until the message has been sent to the output device. Alternatively, the driver can return immediately and the MIDI data can be output in the background.
Available in Windows XP and later Windows operating systems.
|Mmddk.h (include Mmddk.h, Mmsystem.h, or Windows.h)|