• wince mobile环境下播放WAV声音


     [DllImport("coredll", EntryPoint = "PlaySound")]
            public static extern int PlaySnd(string pszSound, int hmod, uint fdwSound);
            private void PlaySound_Click(object sender, EventArgs e)
            {
              //  int i = PlaySnd(@"Temp est.wav", 0, 0x00000000/*SND_SYNC*/);
                 int i = PlaySnd(Globals.GetAppPath() + "\batchover.wav", 0, 0x00000000/*SND_SYNC*/);
            }
     
     

    //得到PDA路径

    public static string GetAppPath()
    {
    string directoryName = Path.GetDirectoryName(Assembly.Load(Assembly.GetExecutingAssembly().GetName()).GetName().CodeBase);
    if (directoryName.Length > 0)
    {
    try
    {
    if (directoryName[directoryName.Length - 1] != '\')
    {
    directoryName = directoryName + @"";
    }
    }
    catch (Exception)
    {
    directoryName = "";
    }
    }
    return directoryName;
    }

  • 相关阅读:
    浅析MySQL二进制日志
    MySQL升级
    浅析MySQL复制
    MySQL关于exists的一个bug
    TokuDB存储引擎
    MySQL中RESET SLAVE和RESET MASTER的区别
    MySQL半同步复制
    MySQL线程池
    分析MariaDB初始化脚本mysql_install_db
    Python装饰器
  • 原文地址:https://www.cnblogs.com/buy0769/p/4580389.html
Copyright © 2020-2023  润新知