Introduction - If you have any usage issues, please Google them yourself
[DllImport( CoreDll.dll )] //, EntryPoint sound
public static extern bool PlaySound(string pszSound, int hmod, int fdwSound)
public const int SND_FILENAME 0x00020000
public const int SND_ASYNC 0x0001
public void sound(string soundPath)//例:soundPath sound\\2.wav 路径只满足环境目录下就OK
{
PlaySound(soundPath, 0, SND_ASYNC | SND_FILENAME) //播放WAV格式声音
Thread.Sleep(2000) //播放2000毫秒(2秒)
}