cnickl
2007-07-08 05:40:00 UTC
Hi,
I’m trying to get the volume of my soundcard using the Win API auxGetVolume
in a C# program:
I declare the function like this:
[DllImport("winmm.dll")]
public static extern int auxGetVolume(int uDeviceID, out long lpdwVolume);
later I call it:
long AuxVol;
auxGetVolume(0, out AuxVol);
regardless what I try, it returns 0, even so I hear music playing. The whole
thing works fine using waveGetVolume. What am I doing wrong? Is there a good
code example using C#?
thanks
I’m trying to get the volume of my soundcard using the Win API auxGetVolume
in a C# program:
I declare the function like this:
[DllImport("winmm.dll")]
public static extern int auxGetVolume(int uDeviceID, out long lpdwVolume);
later I call it:
long AuxVol;
auxGetVolume(0, out AuxVol);
regardless what I try, it returns 0, even so I hear music playing. The whole
thing works fine using waveGetVolume. What am I doing wrong? Is there a good
code example using C#?
thanks