The WODM_SETVOLUME message requests a waveform output driver to set the volume level for the specified device.
The driver should return MMSYSERR_NOERROR if the operation succeeds. Otherwise it should return one of the MMSYSERR or WAVERR error codes defined in mmsystem.h. See waveOutSetVolume return values in the Win32 SDK.
A client sends the WODM_SETVOLUME message by calling the user-mode driver’s wodMessage entry point, passing the specified parameters.
Support for this message by user-mode drivers is optional. If the driver supports WODM_SETVOLUME, it must support WODM_GETVOLUME.
The volume value is returned in the DWORD pointed to by dwParam1 as follows.
Channel |
Portion of dwParam1 Used |
Left channel |
Low word |
Right channel |
High word |
Single channel |
Low word |
A value of zero is silence, and a value of 0xFFFF is full volume.
Typically, the user-mode driver calls DeviceIoControl to send the kernel-mode driver an IOCTL_WAVE_SET_VOLUME control code.