zoukankan      html  css  js  c++  java
  • 站立会议的内容(第十一次)

    今天的下午和晚上,我们共同完成了对MCIPlay.cs文件的编写和测试。

     1 using System;
     2 using System.Collections.Generic;
     3 using System.Linq;
     4 using System.Text;
     5 using System.Runtime.InteropServices;
     6 
     7 namespace PlayPlane_01
     8 {
     9     class MCIPlay
    10     {
    11         public static uint SND_ASYNC = 0x0001;
    12         public static uint SND_FILENAME = 0x00020000;
    13         [DllImport("winmm.dll")]
    14         public static extern uint mciSendString(string lpstrCommand,
    15         string lpstrReturnString, uint uReturnLength, uint hWndCallback);
    16 
    17         private string musicPath;
    18 
    19         public MCIPlay(string musicPath)
    20         {
    21             this.musicPath = musicPath;
    22         }
    23 
    24         public void Play()
    25         {
    26             mciSendString(@"close temp_alias", null, 0, 0);
    27             mciSendString(@"open "+musicPath+" alias temp_alias", null, 0, 0);
    28             mciSendString("play temp_alias ", null, 0, 0);
    29         }
    30     }
    31 }

  • 相关阅读:
    windows 启动关闭Oracle监听和服务
    自定义 Git
    c++ cmakelist 详解
    vue自定义错误界面
    C++ Web 编程
    前端如何将H5页面打包成本地app?
    django教程
    部署 Django
    Django 国际化和本地化
    Django与CSRF 、AJAX
  • 原文地址:https://www.cnblogs.com/BLZ1/p/5517764.html
Copyright © 2011-2022 走看看