WinMMWaveOutSetVolume Method
Sets the volume level of the specified waveform-audio output device.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("WinMM.dll", EntryPoint = "waveOutSetVolume", SetLastError = true)]
public static WinMmResult WaveOutSetVolume(
IntPtr hwo,
uint volume
)
<DllImportAttribute("WinMM.dll", EntryPoint := "waveOutSetVolume", SetLastError := true>]
Public Shared Function WaveOutSetVolume (
hwo As IntPtr,
volume As UInteger
) As WinMmResult
Dim hwo As IntPtr
Dim volume As UInteger
Dim returnValue As WinMmResult
returnValue = WinMM.WaveOutSetVolume(hwo,
volume)
public:
[DllImportAttribute(L"WinMM.dll", EntryPoint = L"waveOutSetVolume", SetLastError = true)]
static WinMmResult WaveOutSetVolume(
IntPtr hwo,
unsigned int volume
)
[<DllImportAttribute("WinMM.dll", EntryPoint = "waveOutSetVolume", SetLastError = true)>]
static member WaveOutSetVolume :
hwo : IntPtr *
volume : uint32 -> WinMmResult
No code example is currently available or this language may not be supported.
- hwo IntPtr
-
A IntPtr to an open waveform-audio output device.
This parameter can also be a device identifier.
- volume UInt32
- T
New volume setting.
The low-order word contains the left-channel volume setting, and the high-order word contains the right-channel setting.
A value of 0xFFFF represents full volume, and a value of 0x0000 is silence.
If a device does not support both left and right volume control,
the low-order word of volume specifies the volume level, and the high-order word is ignored.
WinMmResult
Returns
NoError if successful.
Possible error values include the following:
BadDeviceId,
InvalidHandleNoDriver,
NoMem,
NotSupported.