MODM_STRMDATA function

WINMM sends the MODM_STRMDATA message to the modMessage function of a MIDI output driver to get the MIDI output device to send stream data.

Syntax


DWORD modMessage(
   UINT      uDeviceID,
   UINT      uMsg,
   DWORD_PTR dwUser,
   DWORD_PTR dwParam1,
   DWORD_PTR dwParam2
);

Parameters

uDeviceID

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.

uMsg

WINMM sets this parameter to MODM_STRMDATA when it calls modMessage to process this message.

dwUser

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.

dwParam1

This parameter specifies a far pointer to MIDIHDR structure that contains data in the stream buffer format.

dwParam2

This parameter specifies the size, in bytes, of the MIDIHDR structure.

Return value

The modMessage function returns MMSYSERR_NOERROR if the operation was successful. Otherwise, it returns MMSYSERR_NOTENABLED to indicate that the driver failed to load or initialize.

Remarks

The dwStreamID member of the MIDIEVENT structure is documented as reserved in the Windows SDK documentation. This member actually contains the destination of the given event. The driver must process the event only under the following circumstances:

  • dwStreamID matches one of the stream identifiers given in the array that is specified by the rgIds member of the MIDIOPENDESC structure (specified in the MODM_OPEN message). In this case, the driver must process the event on the port to which the stream identifier was bound by means of a device identifier in the MODM_OPEN message.

  • dwStreamID contains a -1 (0xFFFFFFFFL). In this case, the driver must process the event for all ports that are open on this stream.

Requirements

Target platform

Desktop

Version

Available in Windows XP and later Windows operating systems.

Header

Mmddk.h (include Mmddk.h, Mmsystem.h, or Windows.h)

See also

modMessage
MIDIHDR
MIDIEVENT
MIDIOPENDESC

 

 

Send comments about this topic to Microsoft

Show: