Thanks, Peter.
I had tried the first method,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
public class CoreLibVol
{
[DllImport("Coredll.dll")]
public static extern bool sndPlaySound(string lpszSoundName, uint
fuSound);
[DllImport("Coredll.dll")]
public static extern uint waveOutSetVolume(uint hwo, ulong dwVolume);
...
}
public class SetVolumeCls
{
...
public void GetWaveFormAudio()
{
uint DeviceID;
uint pVolume;
CoreLibVol.waveOutGetVolume(DeviceID, out pVolume);
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
how can i get the DeviceID in my program?
"Peter Foot [MVP]" <(E-Mail Removed)> 写入消息新闻
:(E-Mail Removed)...
> You can either P/Invoke the waveOutSetVolume API method, or use the
> ready-made OpenNETCF.Multimedia.Audio.Player class and it's Volume
property
> (www.opennetcf.org/sdf/)
>
> Peter
>
> --
> Peter Foot
> Windows Embedded MVP
> www.inthehand.com | www.opennetcf.org
>
> "compboy" <(E-Mail Removed)> wrote in message
> news:u4O$(E-Mail Removed)...
> >
> >
>
>