Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than winmm, prefix the name with the module name and a period.
waveOutSetVolume (winmm)
.
C# Signature:
[DllImport("winmm.dll", SetLastError=true, CallingConvention=CallingConvention.Winapi)]
public static extern uint waveOutSetVolume(int uDeviceID, uint dwVolume);
public static extern int waveOutSetVolume(int uDeviceID, int dwVolume);
[DllImport("winmm.dll", SetLastError=true, CallingConvention=CallingConvention.Winapi)]
public static extern uint waveOutSetVolume(IntPtr uDeviceID, uint dwVolume);
public static extern int waveOutSetVolume(IntPtr uDeviceID, int dwVolume);
VB Signature:
Declare Auto Function waveOutSetVolume Lib "winmm.dll" (ByVal uDeviceID As IntPtr, ByVal dwVolume As UInteger) As UInteger
Declare Auto Function waveOutSetVolume Lib "winmm.dll" (ByVal uDeviceID As Integer, ByVal dwVolume As Integer) As Integer
User-Defined Types:
None.
Alternative Managed API:
Do you know one? Please contribute it!
Notes:
VB - Use "Auto" in the Declare statement to have VB automatically marshal strings using the proper coding. ANSI is default.
Tips & Tricks:
Please add some!
Sample Code:
// Each volume setting must be in the range between &H0 (silence) and &HFFFF (maximum volume).
// ' Set the volume for all channels to &H7FFF (50%)
// retval = waveOutSetVolume(0, &H7FFF7FFF) ' for both channels, if needed
public void SetVolume(uint volume)
public void SetVolume(int volume)
{
if (m_WaveOut != IntPtr.Zero)
WaveNative.waveOutSetVolume(m_WaveOut,volume);
}
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).