using System.Runtime.InteropServices;
to allow using COM Interop in your class.
Next we derlare two functions from an unmanaged DLL:
[DllImport("winmm.dll")]
public static extern int waveOutGetVolume(IntPtr hwo, out uint dwVolume);
[DllImport("winmm.dll")]
public static extern int waveOutSetVolume(IntPtr hwo, uint dwVolume);
Using these functions, we can increase or decrease the sound level of the sound card.
The following example shows how to mute the sound.
waveOutSetVolume(IntPtr.Zero, 0);
Check out калькулятор автокредита
No comments:
Post a Comment