WinMMWaveOutGetVolume Method

Gets the volume level of the specified waveform-audio output device.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: 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 = "waveOutGetVolume", SetLastError = true)]
public static WinMmResult WaveOutGetVolume(
	IntPtr hwo,
	ref uint refVolume
)

Parameters

hwo  IntPtr
A IntPtr to an open waveform-audio output device. This parameter can also be a device identifier.
refVolume  UInt32
T Pointer to a variable to be filled with the current volume setting.

The low-order word of this location 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 the specified location contains the mono volume level.

The full 16-bit setting(s) set with the WaveOutSetVolume(IntPtr, UInt32) function is returned, regardless of whether the device supports the full 16 bits of volume-level control.

Return Value

WinMmResult
Returns NoError if successful.

Possible error values include the following:

BadDeviceId, InvalidHandleNoDriver, NoMem, NotSupported.

Remarks

See Also