MODM_STOP - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// mmddk.h

DWORD modMessage(
   UINT      uDeviceID,
   UINT      uMsg,
   DWORD_PTR dwUser,
   DWORD_PTR dwParam1,
   DWORD_PTR dwParam2
);
View the official Windows hardware development documentation

NtDoc

No description available.

Windows hardware development documentation (modm-stop)

MODM_STOP function

WINMM sends the MODM_STOP message to the modMessage function of a MIDI output driver to stop output from the output queue and to turn off any notes that are playing.

Parameters

Return value

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

Remarks

If the output queue of the MIDI output driver is not empty, it must stop all pending data blocks and mark them as done by setting the MHDR_DONE bit in the dwFlags field of the MIDIHDR structure for each block. The driver must then notify the client by using DriverCallback to send a MOM_DONE message for each data block.

The driver should send a note-off event for all notes that are currently turned on. In addition, the driver should send a damper pedal off event (controller 0x40) for each channel. If the device is an internal synthesizer, the driver should turn off any notes that are playing.

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

DriverCallback

MIDIHDR

MOM_DONE