<a href='http://www.biancheng88.cn/html/2009-3/shipin-96718.html'>C# 视频监控系列(2):客户端——封装API</a><br><br><div id="google_ad" style="float: left"><script type="text/javascript"><!--
google_ad_client = "pub-0674854344666573";
/* 300x250, 创建于 08-11-25 */
google_ad_slot = "7117884306";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script><script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><P> </P>
<P><STRONG>前言</STRONG></P>
<P> 本章主要是在<A id=AjaxHolder_ctl01_TitleUrl href="http://www.cnblogs.com/goodyao/archive/2008/06/30/1232690.html">C#封装的海康DVR客户端SDK</A> 的代码上修改的,并参考《<FONT face=Verdana>Hikvision 板卡网络开发包编程手册V4.7.pdf》补上更完整的注释,并且参照VC++源码做了小部分修改。</FONT></P>
<P> </P>
<P><STRONG>参考</STRONG></P>
<P> 1. <A id=AjaxHolder_ctl01_TitleUrl href="http://www.cnblogs.com/goodyao/archive/2008/06/30/1232690.html">C#封装的海康DVR客户端SDK</A> </P>
<P> </P>
<P><STRONG>系列</STRONG></P>
<P> 1. <A class=postTitle2 id=homepage1_HomePageDays_DaysList_ctl00_DayItem_DayList_ctl00_TitleUrl href="http://www.cnblogs.com/over140/archive/2009/02/18/1387448.html">C# 视频监控系列(1):准备</A> </P>
<P> 2. <A title="C# 视频监控系列(2):客户端——封装API" href="http://www.cnblogs.com/over140/archive/2009/02/15/1390890.html">C# 视频监控系列(2):客户端——封装API</A></P>
<P> </P>
<P><STRONG style="COLOR: red">注意</STRONG></P>
<P> <SPAN style="COLOR: red">本系列文章限于学习交流,注重过程,由于涉及公司,所以不提供源代码下载,非常抱歉!!但是请大家放心,核心、实现以及其他能够贴出来的代码我都会贴出来,并且争取尽所能的回答评论里的每一个问题,感谢大家关注,欢迎交流 :)</SPAN></P>
<P> </P>
<P><STRONG>正文</STRONG></P>
<P> 本章主要是贴封装好的API调用代码,所以直接就贴代码了。</P>
<P> </P>
<P> 代码说明:</P>
<P> 1. C#调用VC++写好的DLL在这里就不介绍了,重点和难点在于参数数据类型对应,下一章将有所总结。</P>
<P> 2. 注释比较详尽,注释里<FONT face=Verdana>summary</FONT>节点里有函数的VC++原型。</P>
<P> </P>
<DIV class=cnblogs_code><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><SPAN style="COLOR: #0000ff">using</SPAN><SPAN style="COLOR: #000000"> System;<BR></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN style="COLOR: #000000"> System.Runtime.InteropServices;<BR><BR></SPAN><SPAN style="COLOR: #0000ff">namespace</SPAN><SPAN style="COLOR: #000000"> HikClient<BR>{<BR> </SPAN><SPAN style="COLOR: #0000ff">#region</SPAN><SPAN style="COLOR: #000000"> struct</SPAN><SPAN style="COLOR: #000000"><BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 客户端的参数结构<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 说明:如果将m_bUserCheck置为FALSE,则把用户名和密码作为空指针发送到服务器。虽然用户名和密<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 码的内容不能超过50字节,但是用户名和密码缓冲区长度必须大于等于50,因为内部操作的时候直接从<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 用户名或密码缓冲区拷贝50字节到发送缓冲区里。 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">struct</SPAN><SPAN style="COLOR: #000000"> CLIENT_VIDEOINFO<BR> {<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 对应服务端的的通道号<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">byte</SPAN><SPAN style="COLOR: #000000"> m_bRemoteChannel;<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 网络连接方式<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">byte</SPAN><SPAN style="COLOR: #000000"> m_bSendMode;<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 图像格式,0为服务端主通道的图像 ;1为服务端子通道的图像<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">byte</SPAN><SPAN style="COLOR: #000000"> m_nImgFormat;<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 服务端的IP地址<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> m_sIPAddress;<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 用户名 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> m_sUserName;<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 密码 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> m_sUserPassword;<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 是否需要发送用户名和密码<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> m_bUserCheck;<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 显示区域<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> System.IntPtr m_hShowVideo;<BR> }<BR><BR> </SPAN><SPAN style="COLOR: #0000ff">#endregion</SPAN><SPAN style="COLOR: #000000"><BR><BR> </SPAN><SPAN style="COLOR: #0000ff">#region</SPAN><SPAN style="COLOR: #000000"> enum</SPAN><SPAN style="COLOR: #000000"><BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 网络连接方式<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">enum</SPAN><SPAN style="COLOR: #000000"> SEND_MODE<BR> {<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> UDP方式<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> UDPMODE </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #800080">0</SPAN><SPAN style="COLOR: #000000">,<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> TCP方式<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> TCPMODE,<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 多播方式<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> MULTIMODE,<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 电话线方式<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> DIALING,<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 音频流畅模式<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> AUDIODETACH<BR> };<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 显示模式<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">enum</SPAN><SPAN style="COLOR: #000000"> DISP_MODE<BR> {<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 可以同时显示多个窗口,但对显卡有一定要求<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> NORMALMODE </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #800080">0</SPAN><SPAN style="COLOR: #000000">,<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 只能同时显示一个窗口,但是对显卡没有什么要求<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> OVERLAYMODE<BR> };<BR><BR> </SPAN><SPAN style="COLOR: #0000ff">#endregion</SPAN><SPAN style="COLOR: #000000"><BR><BR> </SPAN><SPAN style="COLOR: #0000ff">#region</SPAN><SPAN style="COLOR: #000000"> delegate</SPAN><SPAN style="COLOR: #000000"><BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 读实时数据回调。用于读取数据流。如果ReadDataCallBack为null,表示不需要读取数据流<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> Void(CALLBACK*ReadDataCallBack)(DWORD nChannel,UCHAR *pPacketBuffer,DWORD nPacketSize)); <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="nChannel"></SPAN><SPAN style="COLOR: #008000">表示通道号</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="pPacketBuffer"></SPAN><SPAN style="COLOR: #008000">数据缓存指针</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="nPacketSize"></SPAN><SPAN style="COLOR: #008000">数据个数</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">delegate</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> ReadDataCallBack(</SPAN><SPAN style="COLOR: #0000ff">ulong</SPAN><SPAN style="COLOR: #000000"> nChannel, [MarshalAs(UnmanagedType.LPArray)] </SPAN><SPAN style="COLOR: #0000ff">byte</SPAN><SPAN style="COLOR: #000000">[] pPacketBuffer, </SPAN><SPAN style="COLOR: #0000ff">ulong</SPAN><SPAN style="COLOR: #000000"> nPacketSize);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 捕图回调<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> void (CALLBACK* CapPicFun)(long StockHandle, char * pBuf, long nSize, long nWidth, long nHeight, long nStamp, long nType, long nReceaved)<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="StockHandle"></SPAN><SPAN style="COLOR: #008000">MP4_ClientStart成功返回的值。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="pBuf"></SPAN><SPAN style="COLOR: #008000">返回图像数据</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="nSize"></SPAN><SPAN style="COLOR: #008000">返回图像数据大小</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="nWidth"></SPAN><SPAN style="COLOR: #008000">画面宽,单位像素</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="nHeight"></SPAN><SPAN style="COLOR: #008000">画面高</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="nStamp"></SPAN><SPAN style="COLOR: #008000">时标信息,单位毫秒</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="nType"></SPAN><SPAN style="COLOR: #008000">数据类型, T_RGB32,T_UYVY详见宏定义说明。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="nReceaved"></SPAN><SPAN style="COLOR: #008000">保留</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">delegate</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> CapPicFun(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> StockHandle, IntPtr pBuf, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> nSize, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> nWidth, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> nHeight, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> nStamp, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> nType, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> nReceaved);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 画<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">delegate</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> DrawFun(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> StockHandle, System.Drawing.Graphics hDc, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> nUser);<BR><BR><BR> </SPAN><SPAN style="COLOR: #0000ff">#endregion</SPAN><SPAN style="COLOR: #000000"><BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> hikclient.dll HikClient<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000"> PcHikClient<BR> {<BR><BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">readonly</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">uint</SPAN><SPAN style="COLOR: #000000"> WM_USER </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #800080">0x0400</SPAN><SPAN style="COLOR: #000000">;<BR><BR> </SPAN><SPAN style="COLOR: #0000ff">#region</SPAN><SPAN style="COLOR: #000000"> 客户端函数</SPAN><SPAN style="COLOR: #000000"><BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 对客户端初始化<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 注:在调用所有其他客户端函数之前调用。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 1. BOOL __stdcall MP4_ClientStartup(UINT nMessage,HWND hWnd);<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="nMessage"></SPAN><SPAN style="COLOR: #008000">表示对应接收程序的消息。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="hWnd"></SPAN><SPAN style="COLOR: #008000">表示应用程序窗口句柄。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientStartup(</SPAN><SPAN style="COLOR: #0000ff">uint</SPAN><SPAN style="COLOR: #000000"> nMessage, IntPtr hWnd);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 结束调用客户端函数。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 注:调用MP4_ClientCleanup()后不能再调用其他客户端函数。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 2. BOOL __stdcall MP4_ClientCleanup();<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientCleanup();<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 启动客户端<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 注 :MP4_ClientStart返回成功,并不表示已经成功连接服务端。您需要通过MP4_ClientGetState函数 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 去获得网络连接的状态 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 3. LONG __stdcall MP4_ClientStart(PCLIENT_VIDEOINFO pClientinfo, Void(CALLBACK*ReadDataCallBack)(DWORD nChannel,UCHAR *pPacketBuffer,DWORD nPacketSize));<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="pClientinfo"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="rdcb"></SPAN><SPAN style="COLOR: #008000">用来读取数据流。如果ReadDataCallBack为NULL,表示不需要读取数据流。 </SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回-1表示失败,其他值表示成功。作为后续操作的参数。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> MP4_ClientStart(</SPAN><SPAN style="COLOR: #0000ff">ref</SPAN><SPAN style="COLOR: #000000"> CLIENT_VIDEOINFO pClientinfo, ReadDataCallBack rdcb);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 停止客户端。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 4. BOOL __stdcall MP4_ClientStop(LONG StockHandle); <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="StockHandle"></SPAN><SPAN style="COLOR: #008000">MP4_ClientStart成功返回的值。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientStop(</SPAN><SPAN style="COLOR: #0000ff">long</SPAN><SPAN style="COLOR: #000000"> StockHandle);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 获取客户端状态<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> -1 : 无效<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 1 : 连接<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 2 : 开始接收图像<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 3 : 异常退出<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 4 : 接收完毕,退出<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 5 : 无法联系服务器<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 6 : 服务器拒绝访问<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 5.LONG __stdcall MP4_ClientGetState(LONG StockHandle);<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="StockHandle"></SPAN><SPAN style="COLOR: #008000">成功返回的值</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> MP4_ClientGetState(</SPAN><SPAN style="COLOR: #0000ff">long</SPAN><SPAN style="COLOR: #000000"> StockHandle);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 开始客户端的数据捕获(回调方式,使用MP4_ClientStart中的ReadDataCallBack函数)。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 6.BOOL __stdcall MP4_ClientStartCapture(LONG StockHandle);<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="StockHandle"></SPAN><SPAN style="COLOR: #008000">MP4_ClientStart成功返回的值。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientStartCapture(</SPAN><SPAN style="COLOR: #0000ff">long</SPAN><SPAN style="COLOR: #000000"> StockHandle);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 开始客户端的数据捕获(直接写文件方式)。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 7.BOOL __stdcall MP4_ClientStartCaptureFile(LONG StockHandle, LPTSTR FileName);<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="StockHandle"></SPAN><SPAN style="COLOR: #008000">MP4_ClientStart成功返回的值。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="FileName"></SPAN><SPAN style="COLOR: #008000">文件名。 </SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientStartCaptureFile(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> StockHandle, </SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> FileName);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 停止客户端的数据捕获。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 对MP4_ClientStartCapture和MP4_ClientStartCaptureFile都有效。 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 8.BOOL __stdcall MP4_ClientStopCapture(LONG StockHandle); <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="StockHandle"></SPAN><SPAN style="COLOR: #008000">MP4_ClientStart成功返回的值。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientStopCapture(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> StockHandle);<BR> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 获取服务端的通道数。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 9.WORD __stdcall MP4_ClientGetServerChanNum(LPCTSTR m_sIPAddress);<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="m_sIPAddress"></SPAN><SPAN style="COLOR: #008000">服务端的IP地址。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回0表示失败,其他值表示通道数。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">ushort</SPAN><SPAN style="COLOR: #000000"> MP4_ClientGetServerChanNum(</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> m_sIPAddress);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 给服务器发送字符串<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 10.BOOL __stdcall MP4_ClientCommandtoServer(LPCTSTR m_lAddrIP, char *m_sCommand,WORD m_wLen)<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="m_lAddrIP"></SPAN><SPAN style="COLOR: #008000">服务器IP地址</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="m_sCommand"></SPAN><SPAN style="COLOR: #008000">消息缓冲指针</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="m_wLen"></SPAN><SPAN style="COLOR: #008000">消息缓冲长度,必须小于900个字节</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回0表示失败,其他值表示通道数。 </SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientCommandtoServer(</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> m_lAddrIP, </SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> m_sCommand, </SPAN><SPAN style="COLOR: #0000ff">ushort</SPAN><SPAN style="COLOR: #000000"> m_wLen);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 对服务端的nChannel通道网络连接初始化,结束当前所有用户对它的访问。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 11.BOOL __stdcall MP4_ClientShut(LPCTSTR m_lAddrIP,char nChannel);<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="m_lAddrIP"></SPAN><SPAN style="COLOR: #008000">表示服务端的IP地址。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="cChannel"></SPAN><SPAN style="COLOR: #008000">表示服务端通道号。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。 </SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientShut(</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> m_lAddrIP, </SPAN><SPAN style="COLOR: #0000ff">char</SPAN><SPAN style="COLOR: #000000"> cChannel);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 读取服务端消息。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 读取服务端MP4_ServerStringToClient函数发送过来的消息。(不超过900字节)<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 12. void __stdcall MP4_ClientReadLastMessage(char * m_sIP ,char *m_sCommand,WORD *m_wLen); <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="m_sIP"></SPAN><SPAN style="COLOR: #008000">消息来自哪个IP地址。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="m_sCommand"></SPAN><SPAN style="COLOR: #008000">消息缓冲区指针。 </SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="m_wLen"></SPAN><SPAN style="COLOR: #008000">消息缓冲区长度。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> MP4_ClientReadLastMessage(</SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> m_sIP, </SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> m_sCommand, </SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">ushort</SPAN><SPAN style="COLOR: #000000"> m_wLen);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 设置当前播放器音量。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 13.BOOL __stdcall MP4_ClientAudioVolume(WORD wVolume); <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="wVolume"></SPAN><SPAN style="COLOR: #008000">音量值(0-0xffff) </SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientAudioVolume(</SPAN><SPAN style="COLOR: #0000ff">ushort</SPAN><SPAN style="COLOR: #000000"> wVolume);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 选定某个播放器播放声音,其他播放器静止。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 14. BOOL __stdcall MP4_ClientAudioStart(LONG StockHandle);<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="StockHandle"></SPAN><SPAN style="COLOR: #008000">MP4_ClientStart成功返回的值。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientAudioStart(</SPAN><SPAN style="COLOR: #0000ff">long</SPAN><SPAN style="COLOR: #000000"> StockHandle);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 停止播放声音<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 15. BOOL __stdcall MP4_ClientAudioStop();<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。 </SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientAudioStop();<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 功能同MP4_ClientCommandtoServer,只是第一个参数使用了MP4_ClientStart成功返回的值。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 16. BOOL __stdcall MP4_ClientCommandtoServer_Handle(LONG StockHandle,char *m_sCommand, WORD m_wLen); <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="StockHandle"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="m_sCommand"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="m_wLen"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientCommandtoServer_Handle(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> StockHandle, </SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> m_sCommand, </SPAN><SPAN style="COLOR: #0000ff">ushort</SPAN><SPAN style="COLOR: #000000"> m_wLen);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 系统是否支持网络播放器(在显示模式设为NORMALMODE的情况下)。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 17.int __stdcall MP4_ClientIsSupport(); <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回值的低8位每位表示一个信息。每一位的定义如上所示,0表示不支持,1表示支持。 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 如果SUPPORT_DDRAW、SUPPORT_BLT、SUPPORT_CPU其中有一个为0,表示播放器根本无法播放; <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 如果SUPPORT_BLTFOUR、SUPPORT_BLTSHRINKX、SUPPORT_BLTSHRINKY、 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> SUPPORT_BLTSTRETCHX、SUPPORT_BLTSTRETCHY其中有一个为0,表示播放器虽然能够播放,但<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 是效率很低,有可能因为CPU利用率太高而无法显示。 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 播放器必须在增强色(16位),或者真彩色(32位)模式下运行。如果出现SUPPORT_BLTFOURCC、 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> SUPPORT_BLTSHRINKX、SUPPORT_BLTSHRINKY、SUPPORT_BLTSTRETCHX、 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> SUPPORT_BLTSTRETCHY其中有一个为0,会采用软件显示方式,这时候必须在真彩色(32位)模式下才<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 能运行。 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> MP4_ClientIsSupport();<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 增加接收缓冲区大小。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 说明:WBufNum值每增加1,表示接收缓冲区增加1帧的数据量。如果以5帧/秒的帧率播放,那么WbufNum=5,表示增加了5帧的缓冲区。 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 18. BOOL __stdcall MP4_ClientSetBufferNum(LONG StockHandle,WORD wBufNum);<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="StockHandle"></SPAN><SPAN style="COLOR: #008000">MP4_ClientStart成功返回的值。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="wBufNum"></SPAN><SPAN style="COLOR: #008000">增加缓冲区个数,0-50。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientSetBufferNum(</SPAN><SPAN style="COLOR: #0000ff">long</SPAN><SPAN style="COLOR: #000000"> StockHandle, </SPAN><SPAN style="COLOR: #0000ff">ushort</SPAN><SPAN style="COLOR: #000000"> wBufNum);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 设置服务端的网络端口号和客户端的网络端口号。同MP4_ServerSetNetPort<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 19. BOOL __stdcall MP4_ClientSetNetPort(WORD dServerPort,WORD dClientPort); <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="dServerPort"></SPAN><SPAN style="COLOR: #008000">服务端的起始网络端口号。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="dClientPort"></SPAN><SPAN style="COLOR: #008000">客户端的网络端口号。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientSetNetPort(</SPAN><SPAN style="COLOR: #0000ff">ushort</SPAN><SPAN style="COLOR: #000000"> dServerPort, </SPAN><SPAN style="COLOR: #0000ff">ushort</SPAN><SPAN style="COLOR: #000000"> dClientPort);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 设置多播的TTL参数。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 20. BOOL __stdcall MP4_ClientSetTTL(unsigned char cTTLVal);<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="cTTLVal"></SPAN><SPAN style="COLOR: #008000">TTL值。1-255,默认32。 </SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientSetTTL(</SPAN><SPAN style="COLOR: #0000ff">char</SPAN><SPAN style="COLOR: #000000"> cTTLVal);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 接收多少数据后才开始播放。 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 21. BOOL __stdcall MP4_ClientSetPlayDelay(LONG StockHandle,WORD DelayLen); <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="StockHandle"></SPAN><SPAN style="COLOR: #008000">MP4_ClientStart成功返回的值。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="DelayLen"></SPAN><SPAN style="COLOR: #008000">预先接收的数据量。单位:K。范围:0-600</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientSetPlayDelay(</SPAN><SPAN style="COLOR: #0000ff">long</SPAN><SPAN style="COLOR: #000000"> StockHandle, </SPAN><SPAN style="COLOR: #0000ff">ushort</SPAN><SPAN style="COLOR: #000000"> DelayLen);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 设置连接服务端的等待时间和尝试次数。参数说明同MP4_ServerSetWait。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 22. BOOL __stdcall MP4_ClientSetWait(DWORD dEachWaitTime,DWORD dTrynum);<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="dEachWaitTime"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="dTrynum"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientSetWait(</SPAN><SPAN style="COLOR: #0000ff">ulong</SPAN><SPAN style="COLOR: #000000"> dEachWaitTime, </SPAN><SPAN style="COLOR: #0000ff">ulong</SPAN><SPAN style="COLOR: #000000"> dTrynum);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 设置播放器的显示模式。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 23. BOOL __stdcall MP4_ClientSetShowMode(DWORD dShowType,COLORREF colorKey);<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="dShowType"></SPAN><SPAN style="COLOR: #008000">显示模式。NORMALMODE或者OVERLAYMODE。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="colorKey"></SPAN><SPAN style="COLOR: #008000">用户设置的透明色,透明色相当于一层透视膜,显示的画面只能穿过这种颜色,而其他的颜色<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 将挡住显示的画面。用户应该在显示窗口中涂上这种颜色,那样才能看到显示画面。一般应该使用一种不<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 常用的颜色作为透明色。这是一个双字节值0x00rrggbb,最高字节为0,后三个字节分别表示r,g,b的值。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">public static extern bool MP4_ClientSetShowMode(UInt32 dShowType, System.Drawing.Color colorKey);</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientSetShowMode(</SPAN><SPAN style="COLOR: #0000ff">ulong</SPAN><SPAN style="COLOR: #000000"> dShowType, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> colorKey);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 设置图象质量。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 说明:设置图像质量,当设置成高质量时画面效果好,但CPU利用率高。在支持多路播放时,可以设为<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 低质量(LOWQUALITY),以降低CPU利用率;当某路放大播放时将该路设置成高质量(HIGHQUALITY),<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 以达到好的画面效果。 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 24. BOOL __stdcall MP4_ClientSetQuality(LONG StockHandle,WORD wPicQuality);<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="StockHandle"></SPAN><SPAN style="COLOR: #008000">MP4_ClientStart成功返回的值。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="wPicQuality"></SPAN><SPAN style="COLOR: #008000">图象质量。LOWQUALITY表示低图象质量,HIGHQUALITY表示高图象质量。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientSetQuality(</SPAN><SPAN style="COLOR: #0000ff">long</SPAN><SPAN style="COLOR: #000000"> StockHandle, </SPAN><SPAN style="COLOR: #0000ff">ushort</SPAN><SPAN style="COLOR: #000000"> wPicQuality);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 设置抓图回调函数。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 注意要尽快返回,如果要停止回调,可以把回调函数指针CapPicFun设为NULL。一旦设置回调函数,则<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 一直有效,直到程序退出。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 25. BOOL __stdcall MP4_ClientSetCapPicCallBack(LONG StockHandle, void (CALLBACK* CapPicFun)(long StockHandle, char * pBuf, long nSize, long nWidth, long nHeight, long nStamp, long nType, long nReceaved)); <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="StockHandle"></SPAN><SPAN style="COLOR: #008000">MP4_ClientStart成功返回的值。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="x"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientSetCapPicCallBack(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> StockHandle, CapPicFun x);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 将抓图得到的图像数据保存成BMP文件。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 保存函数需要占用的较多cpu资源,如果不需要保存图片,则不要调用。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 26.BOOL __stdcall MP4_ClientSavePicFile(char * pBuf,long nSize,long nWidth,long nHeight,long nType,char *sFileName); <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="pBuf"></SPAN><SPAN style="COLOR: #008000">返回图像数据</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="nSize"></SPAN><SPAN style="COLOR: #008000">返回图像数据大小</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="nWidth"></SPAN><SPAN style="COLOR: #008000">画面宽,单位像素</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="nHeight"></SPAN><SPAN style="COLOR: #008000">画面高</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="nType"></SPAN><SPAN style="COLOR: #008000">数据类型, T_RGB32,T_UYVY详见宏定义说明。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="sFileName"></SPAN><SPAN style="COLOR: #008000">要保存的文件名</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientSavePicFile(IntPtr pBuf, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> nSize, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> nWidth, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> nHeight, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> nType, </SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> sFileName);<BR><BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 设置解码时丢弃B帧的个数。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 说明: 丢弃的B帧个数越多,CPU利用率越低,动画感越明显。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 27.BOOL __stdcall MP4_ClientThrowBFrame(LONG StockHandle,DWORD dNum);<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="StockHandle"></SPAN><SPAN style="COLOR: #008000">MP4_ClientStart成功返回的值。 </SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="dNum"></SPAN><SPAN style="COLOR: #008000">丢弃的帧个数。(0,1,2)</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。 </SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientThrowBFrame(</SPAN><SPAN style="COLOR: #0000ff">long</SPAN><SPAN style="COLOR: #000000"> StockHandle, </SPAN><SPAN style="COLOR: #0000ff">ulong</SPAN><SPAN style="COLOR: #000000"> dNum);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 获取已经解码的总帧数。 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 28. DWORD __stdcall MP4_ClientGetFrameNum(LONG StockHandle); <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="StockHandle"></SPAN><SPAN style="COLOR: #008000">MP4_ClientStart成功返回的值。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回帧数值。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">ulong</SPAN><SPAN style="COLOR: #000000"> MP4_ClientGetFrameNum(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> StockHandle);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 获取版本号。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 29.DWORD __stdcall MP4_ClientGetSdkVersion() <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">uint</SPAN><SPAN style="COLOR: #000000"> MP4_ClientGetSdkVersion();<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 30.设置播放声音的模式。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 1> SINGLEAUDIO模式下只能调用 MP4_ClientAudioStart和MP4_ClientAudioStop。 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 2> MULTIAUDIO模式下只能调用 MP4_ClientAudioStartShare和MP4_ClientAudioStopShare。 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 3>两种模式下都可以调用MP4_ClientAudioVolume。 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 4>在客户端软件运行过程中,用户可以在关闭所有播放器的声音之后,可以调用该函数修改播放模式。但<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 是建议用户最好在客户端软件初始化的时候设置一次播放模式,之后不再修改。 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 30.BOOL __stdcall MP4_ClientAudioMode(WORD wMode) <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="wMode"></SPAN><SPAN style="COLOR: #008000">有两个选项。默认使用SINGLEAUDIO。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> SINGLEAUDIO:开发包原来的模式。在一个客户端软件中,同时最多只有一个播放器可以播放声音;<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> MULTIAUDIO:新增加的模式。在一个客户端软件中,同时可以有多个播放器播放声音。 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientAudioMode(</SPAN><SPAN style="COLOR: #0000ff">ushort</SPAN><SPAN style="COLOR: #000000"> wMode);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 开始播放某一路声音。MULTIAUDIO模式下使用。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 31. BOOL __stdcall MP4_ClientAudioStartShare(LONG StockHandle)<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="StockHandle"></SPAN><SPAN style="COLOR: #008000">MP4_ClientStart成功返回的值。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientAudioStartShare(</SPAN><SPAN style="COLOR: #0000ff">long</SPAN><SPAN style="COLOR: #000000"> StockHandle);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 停止播放声音。MULTIAUDIO模式下使用。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 32. BOOL __stdcall MP4_ClientAudioStopShare(LONG StockHandle) <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="StockHandle"></SPAN><SPAN style="COLOR: #008000">MP4_ClientStart成功返回的值。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientAudioStopShare(</SPAN><SPAN style="COLOR: #0000ff">long</SPAN><SPAN style="COLOR: #000000"> StockHandle);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 设置多播组地址和网络端口号。 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 说明: <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 1>目前的多播组采用了两种方式:一是开发包内部分配,用户不需要考虑多播组参数细节,默认采用这种<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 方式;另一种是调用MP4_ClientCastGroup设置多播组参数。 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 2>该函数在MP4_ClientStart或MP4_ClientStart_Card之后调用。 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 3>每个多播组会占用wPort开始的4个端口。 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 33.BOOL __stdcall MP4_ClientCastGroup(LONG StockHandle,char *sIP,WORD wPort)<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="StockHandle"></SPAN><SPAN style="COLOR: #008000">MP4_ClientStart成功返回的值。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="sIP"></SPAN><SPAN style="COLOR: #008000">多播组地址。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="wPort"></SPAN><SPAN style="COLOR: #008000">多播组网络端口号。 </SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientCastGroup(</SPAN><SPAN style="COLOR: #0000ff">long</SPAN><SPAN style="COLOR: #000000"> StockHandle, </SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">string</SPAN><SPAN style="COLOR: #000000"> sIP, </SPAN><SPAN style="COLOR: #0000ff">ushort</SPAN><SPAN style="COLOR: #000000"> wPort);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 设置叠加字幕的回调函数。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 34. BOOL __stdcall MP4_ClientRigisterDrawFun(LONG StockHandle, void (CALLBACK* DrawFun)(LONG StockHandle,HDC hDc,LONG nUser),LONG nUser).<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="StockHandle"></SPAN><SPAN style="COLOR: #008000">MP4_ClientStart成功返回的值。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="x"></SPAN><SPAN style="COLOR: #008000">DC句柄。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="nUser"></SPAN><SPAN style="COLOR: #008000">保留。设置成NULL。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientRigisterDrawFun(</SPAN><SPAN style="COLOR: #0000ff">long</SPAN><SPAN style="COLOR: #000000"> StockHandle, DrawFun x, </SPAN><SPAN style="COLOR: #0000ff">long</SPAN><SPAN style="COLOR: #000000"> nUser);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 清除数据缓冲区。包括客户端和服务端<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 35.BOOL __stdcall MP4_ClientCleanBuffer(LONG nPort,int nCleanType)<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="nPort"></SPAN><SPAN style="COLOR: #008000">MP4_ClientStart的返回值。 </SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="nCleanType"></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 清除类型。 nCleanType为0只清除客户端缓冲区,nCleanType为1只清除服务端缓冲区,<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> nCleanType为2清除客户端/服务端缓冲区。 <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientCleanBuffer(</SPAN><SPAN style="COLOR: #0000ff">long</SPAN><SPAN style="COLOR: #000000"> nPort, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> nCleanType);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 设置视频参数。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 36.BOOL MP4_ClientSetVideoPara(LONG StockHandle,DWORD nRegionNum, int nBrightness, int nContrast, int nSaturation, int nHue) <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="StockHandle"></SPAN><SPAN style="COLOR: #008000">MP4_ClientStart成功返回的值。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="nRegionNum"></SPAN><SPAN style="COLOR: #008000">暂时不用,设置成0。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="nBrightness"></SPAN><SPAN style="COLOR: #008000">亮度,默认64; 范围0-128;</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="nContrast"></SPAN><SPAN style="COLOR: #008000">对比度,默认64; 范围0-128;</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="nSaturation"></SPAN><SPAN style="COLOR: #008000">饱和度,默认64; 范围0-128;</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="nHue"></SPAN><SPAN style="COLOR: #008000">色调,默认64; 范围0-128;</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。 </SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientSetVideoPara(</SPAN><SPAN style="COLOR: #0000ff">long</SPAN><SPAN style="COLOR: #000000"> StockHandle, </SPAN><SPAN style="COLOR: #0000ff">ulong</SPAN><SPAN style="COLOR: #000000"> nRegionNum, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> nBrightness, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> nContrast, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> nSaturation, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> nHue);<BR><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 获取视频参数。<BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> 37.BOOL MP4_ClientGetVideoPara(LONG StockHandle,DWORD nRegionNum, int *pBrightness, int *pContrast, int *pSaturation, int *pHue) <BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"></summary></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="StockHandle"></SPAN><SPAN style="COLOR: #008000">MP4_ClientStart成功返回的值。</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="nRegionNum"></SPAN><SPAN style="COLOR: #008000">暂时不用,设置成0。 </SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="pBrightness"></SPAN><SPAN style="COLOR: #008000">亮度,默认64; 范围0-128;</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="pContrast"></SPAN><SPAN style="COLOR: #008000">对比度,默认64; 范围0-128;</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="pSaturation"></SPAN><SPAN style="COLOR: #008000">饱和度,默认64; 范围0-128;</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><param name="pHue"></SPAN><SPAN style="COLOR: #008000">色调,默认64; 范围0-128;</SPAN><SPAN style="COLOR: #808080"></param></SPAN><SPAN style="COLOR: #008000"><BR> </SPAN><SPAN style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000"> </SPAN><SPAN style="COLOR: #808080"><returns></SPAN><SPAN style="COLOR: #008000">返回TRUE表示成功,返回FALSE表示失败。</SPAN><SPAN style="COLOR: #808080"></returns></SPAN><SPAN style="COLOR: #808080"><BR></SPAN><SPAN style="COLOR: #000000"> [DllImport(</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">hikclient.dll</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">)]<BR> </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">extern</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> MP4_ClientGetVideoPara(</SPAN><SPAN style="COLOR: #0000ff">long</SPAN><SPAN style="COLOR: #000000"> StockHandle, </SPAN><SPAN style="COLOR: #0000ff">ulong</SPAN><SPAN style="COLOR: #000000"> nRegionNum, </SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> pBrightness, </SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> pContrast, </SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> pSaturation, </SPAN><SPAN style="COLOR: #0000ff">out</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> pHue);<BR><BR> </SPAN><SPAN style="COLOR: #0000ff">#endregion</SPAN><SPAN style="COLOR: #000000"><BR> }<BR>}<BR></SPAN></DIV>
<P> </P>
<P>修改记录</P>
<P> 1. 2009-2-27,截图函数有问题</P>
<P> 1.1 委托<FONT face=Verdana>CapPicFun</FONT>的参数<FONT face=Verdana>pBuf数据类型改为IntPtr</FONT></P>
<P> 改前代码:<FONT face=Verdana>public delegate void CapPicFun(int StockHandle, <SPAN style="COLOR: red">[MarshalAs(UnmanagedType.LPArray, SizeConst = 152064)] byte[] </SPAN>pBuf, int nSize, int nWidth, int nHeight, int nStamp, int nType, int nReceaved);</FONT></P>
<P> 改后代码:<FONT face=Verdana><STRONG>public delegate void CapPicFun(int StockHandle, <SPAN style="COLOR: red">IntPtr</SPAN> pBuf, int nSize, int nWidth, int nHeight, int nStamp, int nType, int nReceaved);</STRONG></FONT></P>
<P> 1.2 截图函数参数</P>
<P> 改前代码:<FONT face=Verdana>public static extern bool MP4_ClientSavePicFile(<SPAN style="COLOR: red">[MarshalAs(UnmanagedType.LPArray)]</SPAN> byte[] pBuf, int nSize, int nWidth, int nHeight, int nType, </FONT></P>
<P><FONT face=Verdana>string sFileName);</FONT></P>
<P><FONT face=Verdana> 改后代码:<STRONG><FONT face=Verdana>public static extern bool MP4_ClientSavePicFile(<SPAN style="COLOR: red">IntPtr</SPAN> pBuf, int nSize, int nWidth, int nHeight, int nType, string sFileName);</FONT></STRONG></FONT></P>
<P><FONT face=Verdana> 2. 2009-3-4,<FONT face=Verdana>客户端的数据捕获(录像)</FONT></FONT></P>
<P> 2.1 开始录像</P>
<P> 改前代码:<FONT face=Verdana>public static extern bool MP4_ClientStartCaptureFile(<SPAN style="COLOR: red">long</SPAN> StockHandle, string FileName);</FONT></P>
<P> 改后代码:<FONT face=Verdana>public static extern bool MP4_ClientStartCaptureFile(<SPAN style="COLOR: red">int</SPAN> StockHandle, string FileName);</FONT></P>
<P> 2.2 停止录像<FONT face=Verdana></P>
<P> 改前代码:<FONT face=Verdana>public static extern bool MP4_ClientStopCapture(<SPAN style="COLOR: red">long</SPAN> StockHandle);</FONT></P>
<P> 改后代码:<FONT face=Verdana>public static extern bool MP4_ClientStopCapture(<SPAN style="COLOR: red">int</SPAN> StockHandle);</FONT></P>
<P><STRONG><BR></STRONG></P></FONT>
<P><STRONG>结束</STRONG></P>
<P> 我的客户端主要实现的功能是播放视频和音频,有些API都没有用到,我估计有些API参数类型仍然是不对的,请大家注意了!!</A></P>
C# 视频监控系列(2):客户端——封装API
最新推荐文章于 2009-07-24 09:42:00 发布
本文介绍了一个基于C#的视频监控客户端SDK封装实践,主要内容包括如何在现有基础上进行修改和完善,提供了详细的代码示例及注释说明。
2668

被折叠的 条评论
为什么被折叠?



