C++編寫的程式,已經可以成功預覽到視訊了,所以接下來用C#編寫流媒體客戶端自信了不少。因為通過C++程式碼測試,可以大概瞭解難懂的回撥函式運作機理,這對於C#編寫流媒體客戶端的查錯打下了良好的基礎。不過,C#呼叫C++封裝的DLL,重點在於資料型別的轉換。關於資料型別的轉換,網路上有較多博文,大家可以參考,這裡直接進入C#流媒體客戶端開發了哦。
1. C#新建windowsApplication,名為HKPlay
2. 拖入button,picturebox 控制元件(或EditBox控制元件,這裡做測試,URL固定)
3. 新建類,命名hkclient.cs,編寫匯入海康client.dll介面函式
using System.Runtime.InteropServices;
namespace HKPlay
{
<wbr>public interface IHikClientAdviseSink
<wbr><wbr><wbr> {
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int OnPosLength(UInt32 nLength);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int OnPresentationOpened(int success);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int OnPresentationClosed();
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int OnPreSeek(UInt32 uOldTime, UInt32 uNewTime);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int OnPostSeek(UInt32 uOldTime, UInt32 uNewTime);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int OnStop();
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int OnBegin(UInt32 uTime);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int OnRandomBegin(UInt32 uTime);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int OnContacting(string pszHost);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int OnPutErrorMsg(string pError);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int OnBuffering(UInt32 uFlag, UInt16 uPercentComplete);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int OnChangeRate(int flag);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int OnDisconnect();
<wbr><wbr><wbr> };
<wbr><wbr><wbr> public delegate int pDataRec(int sid, int iusrdata, int idatatype, IntPtr <wbr> pdata, int ilen);
<wbr><wbr><wbr> public delegate int pMsgBack(int sid, int opt, int param1, int param2);
<wbr><wbr> public <wbr> class hkclient
<wbr><wbr> {
<wbr><wbr><wbr><wbr><wbr><wbr> #region <wbr>
<wbr><wbr><wbr><wbr><wbr><wbr> [DllImport("client.dll",
SetLastError = true)]
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static extern int InitStreamClientLib();
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> [DllImport("client.dll")]
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static extern int FiniStreamClientLib();
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> [DllImport("client.dll",
SetLastError = true)]
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static extern int HIKS_CreatePlayer(IHikClientAdviseSink pSink, IntPtrpWndSiteHandle, pDataRec pRecFunc, pMsgBack pMsgFunc, int TransMethod);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> [DllImport("client.dll",
SetLastError = true, CharSet = CharSet.Ansi)]
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static extern int HIKS_OpenURL(int hSession, string pszURL, int iusrdata);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> //public
static extern int HIKS_OpenURL(int hSession, byte[] pszURL, int iusrdata);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> [DllImport("client.dll",
SetLastError = true, CharSet = CharSet.Auto)]
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static extern int HIKS_Play(int hSession);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> [DllImport("client.dll")]
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static extern int HIKS_RandomPlay(int hSession, int timepos);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> [DllImport("client.dll")]
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static extern int HIKS_Pause(int hSession);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> [DllImport("client.dll")]
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static extern int HIKS_Resume(int hSession);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> [DllImport("client.dll")]
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static extern int HIKS_Stop(int hSession);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> [DllImport("client.dll")]
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static extern int HIKS_GetCurTime(int hSession, ref ushort uTime);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> [DllImport("client.dll")]
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static extern int HIKS_ChangeRate(int hSession, int H_scale);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> [DllImport("client.dll")]
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static extern int HIKS_Destroy(int hSession);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> [DllImport("client.dll")]
<wbr> <wbr><wbr><wbr><wbr><wbr><wbr> public static extern int HIKS_GetVideoParams(int hSession, ref <wbr> int ibri, ref int icon,ref int isat, ref int ihue);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> [DllImport("client.dll")]
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static extern int HIKS_SetVideoParams(int hSession, int ibri, int icon, int isat,int ihue);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> [DllImport("client.dll")]
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static extern int HIKS_PTZControl(int hSession, ushort ucommand, int iparaml, intiparam2, int iparam3, int iparam4);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> [DllImport("client.dll")]
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static extern int HIKS_SetVolume(int hSession, ushort volume);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> [DllImport("client.dll")]
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static extern int HIKS_OpenSound(int hSession, bool bExclusive);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> [DllImport("client.dll")]
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static extern int HIKS_CloseSound(int hSession);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> [DllImport("client.dll")]
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static extern int HIKS_ThrowBFrameNum(int hSession, uint nNum);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> [DllImport("client.dll")]
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> public static extern int HIKS_GrabPic(int hSession, string szPicFileName, ushortbyPicType);
<wbr><wbr><wbr><wbr><wbr><wbr> #endregion <wbr> <wbr>}
}
4. 窗體Form1.cs新增如下程式碼
using System.Runtime.InteropServices;
namespace HKPlay
{ <wbr>
<wbr>public partial class Form1 : Form,IHikClientAdviseSink
<wbr><wbr> {
在Form1.cs實現介面IHikClientAdviseSink
<wbr>#region <wbr> IHikClientAdviseSink
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int IHikClientAdviseSink.OnPosLength(UInt32 nLength)
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {
<wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> return 0;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int IHikClientAdviseSink.OnPresentationOpened(int success)
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> m_opened = success;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> return 0;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int IHikClientAdviseSink.OnPresentationClosed()
<wbr><wbr> <wbr><wbr><wbr><wbr><wbr>{
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> return 0;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int IHikClientAdviseSink.OnPreSeek(UInt32 uOldTime, UInt32 uNewTime)
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> return 0;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int IHikClientAdviseSink.OnPostSeek(UInt32 uOldTime, UInt32 uNewTime)
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> <wbr><wbr>return 0;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int IHikClientAdviseSink.OnStop()
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> return 0;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int IHikClientAdviseSink.OnBegin(UInt32 uTime)
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> return 0;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int IHikClientAdviseSink.OnRandomBegin(UInt32 uTime)
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> return 0;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int IHikClientAdviseSink.OnContacting(string pszHost)
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> return 0;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int IHikClientAdviseSink.OnPutErrorMsg(string pError)
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> return 0;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int IHikClientAdviseSink.OnBuffering(UInt32 uFlag, UInt16 uPercentComplete)
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> return 0;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int IHikClientAdviseSink.OnChangeRate(int flag)
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> return 0;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> int IHikClientAdviseSink.OnDisconnect()
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> return 0;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> #endregion
<wbr>
5. 在Form1.cs中初始化新增InitStreamClientLib(),關閉視窗新增FiniStreamClientLib()
6. 編寫Button事件
<wbr>int nRet;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> string pszURL = "rtsp://15.12.111.70/15.12.111.40:8000:HIK-DS8000HC:11:0:admin:12345/av_stream";
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> if (m_hSesssion >=
0)
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> {
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> nRet
= hkclient.HIKS_Stop(m_hSesssion);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> m_opened
= -1;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> }
<wbr><wbr>pDataRec MypDataRec
= new pDataRec(pDataRec1); ///回撥函式在C#建立委託,需例項化<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr>pMsgBack
MypMsgBack = new pMsgBack(pMsgBack1);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> m_hSesssion = hkclient.HIKS_CreatePlayer(null,
pictureBox1.Handle, MypDataRec,MypMsgBack,
0);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> if (m_hSesssion !=
-1)
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> {
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> nRet
= hkclient.HIKS_OpenURL(m_hSesssion, pszURL, 0);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> if
(nRet != 1)
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> {
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> hkclient.HIKS_Destroy(m_hSesssion);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> m_hSesssion
= -1;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> m_opened
= -1;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> return;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> }
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> }
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> while (m_opened <
0)
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> {
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> Thread.Sleep(100);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> }
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> nRet =
hkclient.HIKS_Play(m_hSesssion);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> if (nRet != 1)
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> {
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> hkclient.HIKS_Stop(m_hSesssion);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> m_hSesssion
= -1;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> m_opened
= -1;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> }
7. 編寫回撥函式
#region <wbr> pDataFunc ,pMsgBack
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> private int pDataRec1(int sid, int iusrdata,
int idatatype, IntPtr <wbr> pdata, int ilen)
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {
<wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> using (FileStream
fs = new FileStream("D:\\1.264", FileMode.OpenOrCreate))
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> {
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> BinaryWriter
bw = new BinaryWriter(fs);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> byte[]
bytefs = new byte[ilen];
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> Marshal.Copy(pdata,
bytefs, 0, ilen);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> bw.Write(bytefs);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> bw.Flush();
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> bw.Close();
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> }
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> return 0;
<wbr>
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }
<wbr><wbr><wbr><wbr> <wbr><wbr><wbr>private
int pMsgBack1(int sid, int opt, int param1, int param2)
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> {
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> Console.WriteLine("msgBack:sid={0},opt={1},param1={2},param2={3}",
sid, opt, param1, param2);
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> //int len = -1;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> switch (opt)
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> {
<wbr><wbr><wbr><wbr><wbr> <wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr>case
1:
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> break;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> case
2:
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> m_opened
= param1;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> break;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> case
3:
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> break;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> case
4:
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> break;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> case
5:
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> break;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> case
6:
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> break;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> case
7:
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> // <wbr> this.m_Pause
= 1;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> break;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> case
8:
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> break;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> case
9:
<wbr><wbr><wbr><wbr> <wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr>break;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> case
10:
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> break;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> case
11:
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> break;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> case
12:
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> break;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> case
13:
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> break;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> case
14:
<wbr> <wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> break;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> default:
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> break;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> }
<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> return 0;
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> }
<wbr><wbr><wbr><wbr><wbr><wbr><wbr> #endregion
注意:
(1)將client.dll,playm4.cll放到debug目錄下,playCtrl.dll放到與bin同目錄中。