MODM_SETVOLUME - 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-setvolume)

MODM_SETVOLUME function

WINMM sends the MODM_SETVOLUME message to the modMessage function of a MIDI output driver to set the volume for a MIDI device.

Parameters

Return value

The modMessage function returns MMSYSERR_NOERROR if the operation was successful. Otherwise, it returns one of the error messages in the following table.

Return code Description
MMSYSERR_NOTENABLED The driver failed to load or initialize.
MMSYSERR_NOTSUPPORTED The driver does not support changes to volume level.

Remarks

This volume level is the final output volume; therefore, only drivers for internal synthesizer devices can support volume level changes. Drivers for MIDI output ports must return an MMSYSERR_NOTSUPPORTED error for this message. Support for volume level changes is optional for internal synthesizer devices. When a driver receives a MODM_GETDEVCAPS message, it must indicate support for volume level changes by setting or clearing the MIDICAPS_VOLUME and MIDICAPS_LRVOLUME bits in the dwSupport field of the MIDIOUTCAPS data structure. If a driver supports the MODM_SETVOLUME message, it must also support MODM_GETVOLUME.

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

MODM_GETDEVCAPS

MIDIOUTCAPS