using System.Runtime.InteropSerices; //对DllImport类定义的命名引用
//其他代码
public class MyClass
{
[DllImport("winmm.dll")] //引用winmm.dll
public static extern long waveOutSetVolume(long deviceID, long Volume);
public static void Main()
{
waveOutSetVolume(0, 0xFFFF);
}
}
using System.Runtime.InteropSerices; //对DllImport类定义的命名引用
//其他代码
public class MyClass
{
[DllImport("winmm.dll")] //引用winmm.dll
public static extern long waveOutSetVolume(long deviceID, long Volume);
public static void Main()
{
waveOutSetVolume(0, 0xFFFF);
}
}