C# 海康DVR客户端开发系列(2)—— 封装API

简介:

一、代码截图

   VS  

二、 部分代码

  由于代码过长(超过1W行),这里就不贴全部了,大家直接在更新下面下载最新的SDK即可。

         ///  设置码流速度
        
///   </summary>
         public   const   int  NET_DVR_SETSPEED  =   24 ;
        
///   <summary>
        
///  保持与设备的心跳(如果回调阻塞,建议2秒发送一次)
        
///   </summary>
         public   const   int  NET_DVR_KEEPALIVE  =   25 ;

        
// 远程按键定义如下:
         /*  key value send to CONFIG program  */
        
public   const   int  KEY_CODE_1  =   1 ;
        
public   const   int  KEY_CODE_2  =   2 ;
        
public   const   int  KEY_CODE_3  =   3 ;
        
public   const   int  KEY_CODE_4  =   4 ;
        
public   const   int  KEY_CODE_5  =   5 ;
        
public   const   int  KEY_CODE_6  =   6 ;
        
public   const   int  KEY_CODE_7  =   7 ;
        
public   const   int  KEY_CODE_8  =   8 ;
        
public   const   int  KEY_CODE_9  =   9 ;
        
public   const   int  KEY_CODE_0  =   10 ;
        
public   const   int  KEY_CODE_POWER  =   11 ;
        
public   const   int  KEY_CODE_MENU  =   12 ;
        
public   const   int  KEY_CODE_ENTER  =   13 ;
        
public   const   int  KEY_CODE_CANCEL  =   14 ;
        
public   const   int  KEY_CODE_UP  =   15 ;
        
public   const   int  KEY_CODE_DOWN  =   16 ;
        
public   const   int  KEY_CODE_LEFT  =   17 ;
        
public   const   int  KEY_CODE_RIGHT  =   18 ;
        
public   const   int  KEY_CODE_EDIT  =   19 ;
        
public   const   int  KEY_CODE_ADD  =   20 ;
        
public   const   int  KEY_CODE_MINUS  =   21 ;
        
public   const   int  KEY_CODE_PLAY  =   22 ;
        
public   const   int  KEY_CODE_REC  =   23 ;
        
public   const   int  KEY_CODE_PAN  =   24 ;
        
public   const   int  KEY_CODE_M  =   25 ;
        
public   const   int  KEY_CODE_A  =   26 ;
        
public   const   int  KEY_CODE_F1  =   27 ;
        
public   const   int  KEY_CODE_F2  =   28 ;

        
/*  for PTZ control  */
        
public   const   int  KEY_PTZ_UP_START  =  KEY_CODE_UP;
        
public   const   int  KEY_PTZ_UP_STOP  =   32 ;

        
public   const   int  KEY_PTZ_DOWN_START  =  KEY_CODE_DOWN;
        
public   const   int  KEY_PTZ_DOWN_STOP  =   33 ;

        
public   const   int  KEY_PTZ_LEFT_START  =  KEY_CODE_LEFT;
        
public   const   int  KEY_PTZ_LEFT_STOP  =   34 ;

        
public   const   int  KEY_PTZ_RIGHT_START  =  KEY_CODE_RIGHT;
        
public   const   int  KEY_PTZ_RIGHT_STOP  =   35 ;

        
///   <summary>
        
///  光圈+
        
///   </summary>
         public   const   int  KEY_PTZ_AP1_START  =  KEY_CODE_EDIT;  /*  光圈+  */
        
public   const   int  KEY_PTZ_AP1_STOP  =   36 ;

        
///   <summary>
        
///  光圈-
        
///   </summary>
         public   const   int  KEY_PTZ_AP2_START  =  KEY_CODE_PAN;  /*  光圈-  */
        
public   const   int  KEY_PTZ_AP2_STOP  =   37 ;

        
///   <summary>
        
///  聚焦+
        
///   </summary>
         public   const   int  KEY_PTZ_FOCUS1_START  =  KEY_CODE_A;  /*  聚焦+  */
        
public   const   int  KEY_PTZ_FOCUS1_STOP  =   38 ;

        
///   <summary>
        
///  聚焦-
        
///   </summary>
         public   const   int  KEY_PTZ_FOCUS2_START  =  KEY_CODE_M; /*  聚焦-  */
        
public   const   int  KEY_PTZ_FOCUS2_STOP  =   39 ;

        
///   <summary>
        
///  变倍+
        
///   </summary>
         public   const   int  KEY_PTZ_B1_START  =   40 /*  变倍+  */
        
public   const   int  KEY_PTZ_B1_STOP  =   41 ;

        
///   <summary>
        
///  变倍-
        
///   </summary>
         public   const   int  KEY_PTZ_B2_START  =   42 /*  变倍-  */
        
public   const   int  KEY_PTZ_B2_STOP  =   43 ;

        
// 9000新增
         public   const   int  KEY_CODE_11  =   44 ;
        
public   const   int  KEY_CODE_12  =   45 ;
        
public   const   int  KEY_CODE_13  =   46 ;
        
public   const   int  KEY_CODE_14  =   47 ;
        
public   const   int  KEY_CODE_15  =   48 ;
        
public   const   int  KEY_CODE_16  =   49 ;

        
///   <summary>
        
///  获取网络应用参数 EMAIL
        
///   </summary>
         public   const   int  NET_DVR_GET_EMAILCFG  =   228 ; //
         ///   <summary>
        
///  设置网络应用参数 EMAIL
        
///   </summary>
         public   const   int  NET_DVR_SET_EMAILCFG  =   229 ;     //
        
// 对应NET_DVR_EMAILCFG结构
        
//
         public   const   int  NET_DVR_GET_ALLHDCFG  =   300 ;         //
         #region  DS9000新增命令(_V30)
        
// 设备编码类型配置(NET_DVR_COMPRESSION_AUDIO结构)
         ///   <summary>
        
///  获取设备语音对讲编码参数
        
///   </summary>
         public   const   int  NET_DVR_GET_COMPRESSCFG_AUD  =   1058 ;      //
         ///   <summary>
        
///  设置设备语音对讲编码参数
        
///   </summary>
         public   const   int  NET_DVR_SET_COMPRESSCFG_AUD  =   1059 ;       //
         #endregion
        
///   <summary>
        
///  预览异常
        
///   </summary>
         public   const   int  NET_DVR_REALPLAYEXCEPTION  =   111 ; //
         ///   <summary>
        
///  预览时连接断开
        
///   </summary>
         public   const   int  NET_DVR_REALPLAYNETCLOSE  =   112 ; //
         ///   <summary>
        
///  预览5s没有收到数据
        
///   </summary>
         public   const   int  NET_DVR_REALPLAY5SNODATA  =   113 ;     //
         ///   <summary>
        
///  预览重连
        
///   </summary>
         public   const   int  NET_DVR_REALPLAYRECONNECT  =   114 ;     //
         ///   <summary>
        
///  回放数据播放完毕
        
///   </summary>
         public   const   int  NET_DVR_PLAYBACKOVER  =   101 ; //
         ///   <summary>
        
///  回放异常
        
///   </summary>
         public   const   int  NET_DVR_PLAYBACKEXCEPTION  =   102 ; //
         ///   <summary>
        
///  回放时候连接断开
        
///   </summary>
         public   const   int  NET_DVR_PLAYBACKNETCLOSE  =   103 ; //
         ///   <summary>
        
///  回放5s没有收到数据
        
///   </summary>
         public   const   int  NET_DVR_PLAYBACK5SNODATA  =   104 ;

        
#region  DS-6001D/F
        
///   <summary>
        
///  DS-6001D Decoder
        
///      NET_DVR_DECODERINFO, *LPNET_DVR_DECODERINFO;
        
///   </summary>
         public   struct  NET_DVR_DECODERINFO
        {
            
///   <summary>
            
///  解码设备连接的服务器IP
            
///      public byte byEncoderIP[16];
            
///   </summary>
             public   byte [] byEncoderIP;
            
///   <summary>
            
///  解码设备连接的服务器的用户名
            
///      public byte byEncoderUser[16];
            
///   </summary>
             public   byte [] byEncoderUser;
            
///   <summary>
            
///  解码设备连接的服务器的密码
            
///      public byte byEncoderPasswd[16];
            
///   </summary>
             public   byte [] byEncoderPasswd;
            
///   <summary>
            
///  解码设备连接服务器的连接模式
            
///   </summary>
             public   byte  bySendMode;
            
///   <summary>
            
///  解码设备连接的服务器的通道号
            
///   </summary>
             public   byte  byEncoderChannel;
            
///   <summary>
            
///  解码设备连接的服务器的端口号
            
///   </summary>
             public   ushort  wEncoderPort;
            
///   <summary>
            
///  保留
            
///      public byte reservedData[4];
            
///   </summary>
             public   byte [] reservedData;
        }

        
///   <summary>
        
///  NET_DVR_DECODERSTATE, *LPNET_DVR_DECODERSTATE;
        
///   </summary>
         public   struct  NET_DVR_DECODERSTATE
        {
            
///   <summary>
            
///  解码设备连接的服务器IP
            
///      public byte byEncoderIP[16];
            
///   </summary>
             public   byte [] byEncoderIP;
            
///   <summary>
            
///  解码设备连接的服务器的用户名
            
///      public byte byEncoderUser[16];
            
///   </summary>
             public   byte [] byEncoderUser;
            
///   <summary>
            
///  解码设备连接的服务器的密码
            
///      public byte byEncoderPasswd[16];
            
///   </summary>
             public   byte [] byEncoderPasswd;
            
///   <summary>
            
///  解码设备连接的服务器的通道号
            
///   </summary>
             public   byte  byEncoderChannel;
            
///   <summary>
            
///  解码设备连接的服务器的连接模式
            
///   </summary>
             public   byte  bySendMode;
            
///   <summary>
            
///  解码设备连接的服务器的端口号
            
///   </summary>
             public   ushort  wEncoderPort;
            
///   <summary>
            
///  解码设备连接服务器的状态
            
///   </summary>
             public   uint  dwConnectState;
            
///   <summary>
            
///  保留
            
///      public byte reservedData[4];
            
///   </summary>
             public   byte [] reservedData;
        }

        
#region  解码设备控制码定义
        
public   const   int  NET_DEC_STARTDEC  =   1 ;
        
public   const   int  NET_DEC_STOPDEC  =   2 ;
        
public   const   int  NET_DEC_STOPCYCLE  =   3 ;
        
public   const   int  NET_DEC_CONTINUECYCLE  =   4 ;
        
#endregion


        
#endregion

        
///   <summary>
        
///  Email
        
///      NET_DVR_EMAILPARA, *LPNET_DVR_EMAILPARA;
        
///   </summary>
         public   struct  NET_DVR_EMAILPARA
        {
            
///   <summary>
            
///  邮件账号
            
///      public byte sUsername[64];
            
///   </summary>
             public   string  sUsername;
            
///   <summary>
            
///  邮件密码
            
///      public byte sPassword[64];
            
///   </summary>
             public   string  sPassword;
            
///   <summary>
            
///      public byte sSmtpServer[64];
            
///   </summary>
             public   string  sSmtpServer;
            
///   <summary>
            
///      public byte sPop3Server[64];
            
///   </summary>
             public   string  sPop3Server;
            
///   <summary>
            
///  邮件地址
            
///      public byte sMailAddr[64];
            
///   </summary>
             public   string  sMailAddr;
            
///   <summary>
            
///  上传报警/异常等的email
            
///      public byte sEventMailAddr1[64];
            
///   </summary>
             public   byte [] sEventMailAddr1;
            
///   <summary>
            
///      public byte sEventMailAddr2[64];
            
///   </summary>
             public   byte [] sEventMailAddr2;
            
///   <summary>
            
///      public byte res[16];
            
///   </summary>
             public   byte [] res;
        }

        
///   <summary>
        
///  NET_DVR_NETCFG_OTHER, *LPNET_DVR_NETCFG_OTHER;
        
///   </summary>
         public   struct  NET_DVR_NETCFG_OTHER
        {
            
public   uint  dwSize;
            
///   <summary>
            
///      char    sFirstDNSIP[16];
            
///   </summary>
             public   string  sFirstDNSIP;
            
///   <summary>
            
///      char    sSecondDNSIP[16];
            
///   </summary>
             public   string  sSecondDNSIP;
            
///   <summary>
            
///  char    sRes[32];
            
///   </summary>
             public   string  sRes;
        }

        
///   <summary>
        
///  连接的通道配置 2007-11-05
        
///      NET_DVR_MATRIX_DECCHANINFO, *LPNET_DVR_MATRIX_DECCHANINFO;
        
///   </summary>
         public   struct  NET_DVR_MATRIX_DECCHANINFO
        {
            
///   <summary>
            
///  是否启用 0-否 1-启用
            
///   </summary>
             public   uint  dwEnable;
            
///   <summary>
            
///  轮循解码通道信息
            
///   </summary>
             public  NET_DVR_MATRIX_DECINFO struDecChanInfo;
        }
        
///   <summary>
        
///  压缩参数?
        
///      NET_DVR_COMPRESSIONCFG_NEW, *LPNET_DVR_COMPRESSIONCFG_NEW;
        
///   </summary>
         public   struct  NET_DVR_COMPRESSIONCFG_NEW
        {
            
public   uint  dwSize;
            
///   <summary>
            
///  定时录像
            
///   </summary>
             public  NET_DVR_COMPRESSION_INFO_EX struLowCompression;
            
///   <summary>
            
///  事件触发录像
            
///   </summary>
             public  NET_DVR_COMPRESSION_INFO_EX struEventCompression;
        }
        
///   <summary>
        
///  抓图模式
        
///   </summary>
         public   enum  CAPTURE_MODE
        {
            
///   <summary>
            
///  BMP模式
            
///   </summary>
            BMP_MODE  =   0 ,         //
             ///   <summary>
            
///  JPEG模式 
            
///   </summary>
            JPEG_MODE  =   1          //
        }
        
///   <summary>
        
///  实时声音模式
        
///   </summary>
         public   enum  REALSOUND_MODE
        {
            
///   <summary>
            
///  独占模式
            
///   </summary>
            MONOPOLIZE_MODE  =   1 ,
            
///   <summary>
            
///  共享模式
            
///   </summary>
            SHARE_MODE  =   2
        }
        
///   <summary>
        
///  录象文件参数(带卡号)
        
///      NET_DVR_FINDDATA_CARD, *LPNET_DVR_FINDDATA_CARD;
        
///   </summary>
         public   struct  NET_DVR_FINDDATA_CARD
        {
            
///   <summary>
            
///  文件名
            
///      char sFileName[100];
            
///   </summary>
             public   string  sFileName;
            
///   <summary>
            
///  文件的开始时间
            
///   </summary>
             public  NET_DVR_TIME struStartTime;
            
///   <summary>
            
///  文件的结束时间
            
///   </summary>
             public  NET_DVR_TIME struStopTime;
            
///   <summary>
            
///  文件的大小
            
///   </summary>
             public   uint  dwFileSize;
            
///   <summary>
            
///  卡号?
            
///      char sCardNum[32];
            
///   </summary>
             public   char  sCardNum;
        }

        
///   <summary>
        
///  设置重新连接间隔
        
///      NET_DVR_API BOOL __stdcall NET_DVR_SetReconnect(DWORD dwInterval = 30000, BOOL bEnableRecon = TRUE);
        
///   </summary>
        
///   <param name="dwInterval"></param>
        
///   <param name="bEnableRecon"></param>
        
///   <returns></returns>
        [DllImport( " HCNetSDK.dll " )]
        
public   static   extern   bool  NET_DVR_SetReconnect( uint  dwInterval,  bool  bEnableRecon);
        
///   <summary>
        
///  通过IPSever获取设备动态IP地址[Ex]
        
///      NET_DVR_API BOOL  __stdcall NET_DVR_GetDVRIPByResolveSvr_EX(char *sServerIP, WORD wServerPort, unsigned char *sDVRName, WORD wDVRNameLen, BYTE *sDVRSerialNumber, WORD wDVRSerialLen, char* sGetIP, DWORD *dwPort);
        
///   </summary>
        
///   <param name="sServerIP"></param>
        
///   <param name="wServerPort"></param>
        
///   <param name="sDVRName"></param>
        
///   <param name="wDVRNameLen"></param>
        
///   <param name="sDVRSerialNumber"></param>
        
///   <param name="wDVRSerialLen"></param>
        
///   <param name="sGetIP"></param>
        
///   <param name="dwPort"></param>
        
///   <returns></returns>
        [DllImport( " HCNetSDK.dll " )]
        
public   static   extern   bool  NET_DVR_GetDVRIPByResolveSvr_EX( string  sServerIP,  ushort  wServerPort,  string  sDVRName,  ushort  wDVRNameLen,  string  sDVRSerialNumber,  ushort  wDVRSerialLen, StringBuilder sGetIP,  ref   uint  dwPort);
        
///   <summary>
        
///      NET_DVR_API BOOL __stdcall NET_DVR_PTZControlWithSpeed_EX(LONG lRealHandle, DWORD dwPTZCommand, DWORD dwStop, DWORD dwSpeed);
        
///   </summary>
        
///   <param name="lRealHandle"></param>
        
///   <param name="dwPTZCommand"></param>
        
///   <param name="dwStop"></param>
        
///   <param name="dwSpeed"></param>
        
///   <returns></returns>
        [DllImport( " HCNetSDK.dll " )]
        
public   static   extern   bool  NET_DVR_PTZControlWithSpeed_EX( int  lRealHandle,  uint  dwPTZCommand,  uint  dwStop,  uint  dwSpeed);
        
///   <summary>
        
///      NET_DVR_API BOOL __stdcall NET_DVR_PTZMltTrack(LONG lRealHandle,DWORD dwPTZTrackCmd, DWORD dwTrackIndex);
        
///   </summary>
        
///   <param name="lRealHandle"></param>
        
///   <param name="dwPTZTrackCmd"></param>
        
///   <param name="dwTrackIndex"></param>
        
///   <returns></returns>
        [DllImport( " HCNetSDK.dll " )]
        
public   static   extern   bool  NET_DVR_PTZMltTrack( int  lRealHandle,  uint  dwPTZTrackCmd,  uint  dwTrackIndex);
        
///   <summary>
        
///      NET_DVR_API BOOL __stdcall NET_DVR_PTZMltTrack_Other(LONG lUserID,LONG lChannel,DWORD dwPTZTrackCmd, DWORD dwTrackIndex);
        
///   </summary>
        
///   <param name="lUserID"></param>
        
///   <param name="lChannel"></param>
        
///   <param name="dwPTZTrackCmd"></param>
        
///   <param name="dwTrackIndex"></param>
        
///   <returns></returns>
        [DllImport( " HCNetSDK.dll " )]
        
public   static   extern   bool  NET_DVR_PTZMltTrack_Other( int  lUserID,  int  lChannel,  uint  dwPTZTrackCmd,  uint  dwTrackIndex);
        
///   <summary>
        
///      NET_DVR_API BOOL __stdcall NET_DVR_PTZMltTrack_EX(LONG lRealHandle,DWORD dwPTZTrackCmd, DWORD dwTrackIndex);
        
///   </summary>
        
///   <param name="lRealHandle"></param>
        
///   <param name="dwPTZTrackCmd"></param>
        
///   <param name="dwTrackIndex"></param>
        
///   <returns></returns>
        [DllImport( " HCNetSDK.dll " )]
        
public   static   extern   bool  NET_DVR_PTZMltTrack_EX( int  lRealHandle,  uint  dwPTZTrackCmd,  uint  dwTrackIndex);
        
///   <summary>
        
///  NET_DVR_API LONG __stdcall NET_DVR_FindNextFile_Card(LONG lFindHandle, LPNET_DVR_FINDDATA_CARD lpFindData);
        
///   </summary>
        
///   <param name="lFindHandle"></param>
        
///   <param name="lpFindData"></param>
        
///   <returns></returns>
        [DllImport( " HCNetSDK.dll " )]
        
public   static   extern   int  NET_DVR_FindNextFile_Card( int  lFindHandle, NET_DVR_FINDDATA_CARD lpFindData);
        
///   <summary>
        
///  NET_DVR_API LONG __stdcall NET_DVR_FindFile_Card(LONG lUserID, LONG lChannel, DWORD dwFileType, LPNET_DVR_TIME lpStartTime, LPNET_DVR_TIME lpStopTime);
        
///   </summary>
        
///   <param name="lUserID"></param>
        
///   <param name="lChannel"></param>
        
///   <param name="dwFileType"></param>
        
///   <param name="lpStartTime"></param>
        
///   <param name="lpStopTime"></param>
        
///   <returns></returns>
        [DllImport( " HCNetSDK.dll " )]
        
public   static   extern   int  NET_DVR_FindFile_Card( int  lUserID,  int  lChannel,  uint  dwFileType, NET_DVR_TIME lpStartTime, NET_DVR_TIME lpStopTime);
        
///   <summary>
        
///  NET_DVR_API int    __stdcall NET_DVR_GetPlayBackPos(LONG lPlayHandle);
        
///   </summary>
        
///   <param name="lPlayHandle"></param>
        
///   <returns></returns>
        [DllImport( " HCNetSDK.dll " )]
        
public   static   extern   int  NET_DVR_GetPlayBackPos( int  lPlayHandle);
        
// 解码设备DS-6001D/DS-6001F
         ///   <summary>
        
///  NET_DVR_API BOOL __stdcall NET_DVR_StartDecode(LONG lUserID, LONG lChannel, LPNET_DVR_DECODERINFO lpDecoderinfo);
        
///   </summary>
        
///   <param name="lUserID"></param>
        
///   <param name="lChannel"></param>
        
///   <param name="lpDecoderinfo"></param>
        
///   <returns></returns>
        [DllImport( " HCNetSDK.dll " )]
        
public   static   extern   bool  NET_DVR_StartDecode( int  lUserID,  int  lChannel, NET_DVR_DECODERINFO lpDecoderinfo);
        
///   <summary>
        
///  NET_DVR_API BOOL __stdcall NET_DVR_StopDecode(LONG lUserID, LONG lChannel);
        
///   </summary>
        
///   <param name="lUserID"></param>
        
///   <param name="lChannel"></param>
        
///   <returns></returns>
        [DllImport( " HCNetSDK.dll " )]
        
public   static   extern   bool  NET_DVR_StopDecode( int  lUserID,  int  lChannel);
        
///   <summary>
        
///  NET_DVR_API BOOL __stdcall NET_DVR_GetDecoderState(LONG lUserID, LONG lChannel, LPNET_DVR_DECODERSTATE lpDecoderState);
        
///   </summary>
        
///   <param name="lUserID"></param>
        
///   <param name="lChannel"></param>
        
///   <param name="lpDecoderState"></param>
        
///   <returns></returns>
        [DllImport( " HCNetSDK.dll " )]
        
public   static   extern   bool  NET_DVR_GetDecoderState( int  lUserID,  int  lChannel, NET_DVR_DECODERSTATE lpDecoderState);
        
///   <summary>
        
///  保存参数
        
///      NET_DVR_API BOOL __stdcall NET_DVR_SaveConfig(LONG lUserID);
        
///   </summary>
        
///   <param name="lUserID"></param>
        
///   <returns></returns>
        [DllImport( " HCNetSDK.dll " )]
        
public   static   extern   bool  NET_DVR_SaveConfig( int  lUserID);
        
///   <summary>
        
///      NET_DVR_API BOOL __stdcall NET_DVR_SetVideoEffect(LONG lUserID, LONG lChannel, DWORD dwBrightValue, DWORD dwContrastValue, DWORD dwSaturationValue, DWORD dwHueValue);
        
///   </summary>
        
///   <param name="lUserID"></param>
        
///   <param name="lChannel"></param>
        
///   <param name="dwBrightValue"></param>
        
///   <param name="dwContrastValue"></param>
        
///   <param name="dwSaturationValue"></param>
        
///   <param name="dwHueValue"></param>
        
///   <returns></returns>
        [DllImport( " HCNetSDK.dll " )]
        
public   static   extern   bool  NET_DVR_SetVideoEffect( int  lUserID,  int  lChannel,  uint  dwBrightValue,  uint  dwContrastValue,  uint  dwSaturationValue,  uint  dwHueValue);
        
///   <summary>
        
///      NET_DVR_API BOOL __stdcall NET_DVR_GetVideoEffect(LONG lUserID, LONG lChannel, DWORD *pBrightValue, DWORD *pContrastValue, DWORD *pSaturationValue, DWORD *pHueValue);
        
///   </summary>
        
///   <param name="lUserID"></param>
        
///   <param name="lChannel"></param>
        
///   <param name="pBrightValue"></param>
        
///   <param name="pContrastValue"></param>
        
///   <param name="pSaturationValue"></param>
        
///   <param name="pHueValue"></param>
        
///   <returns></returns>
        [DllImport( " HCNetSDK.dll " )]
        
public   static   extern   bool  NET_DVR_GetVideoEffect( int  lUserID,  int  lChannel,  out   uint  pBrightValue,  out   uint  pContrastValue,  out   uint  pSaturationValue,  out   uint  pHueValue);
三、下章预告

    实现最基本的连接服务器并预览图像的功能。

本文转自博客园农民伯伯的博客,原文链接:C# 海康DVR客户端开发系列(2)—— 封装API,如需转载请自行联系原博主。

目录
相关文章
|
8天前
|
安全 数据挖掘 API
【实时数据】商品详情API接口系列开发
商品详情API接口系列对于电商平台至关重要,它们为开发者提供了实时、准确的商品信息,使得在线销售和展示商品变得更加高效和精准。以下是几个主要的电商平台及其商品详情API接口的介绍:
|
10天前
|
JavaScript 前端开发 测试技术
【vue实战项目】通用管理系统:api封装、404页
【vue实战项目】通用管理系统:api封装、404页
19 3
|
7天前
|
开发框架 前端开发 .NET
LIMS(实验室)信息管理系统源码、有哪些应用领域?采用C# ASP.NET dotnet 3.5 开发的一套实验室信息系统源码
集成于VS 2019,EXT.NET前端和ASP.NET后端,搭配MSSQL 2018数据库。系统覆盖样品管理、数据分析、报表和项目管理等实验室全流程。应用广泛,包括生产质检(如石化、制药)、环保监测、试验研究等领域。随着技术发展,现代LIMS还融合了临床、电子实验室笔记本和SaaS等功能,以满足复杂多样的实验室管理需求。
17 3
LIMS(实验室)信息管理系统源码、有哪些应用领域?采用C# ASP.NET dotnet 3.5 开发的一套实验室信息系统源码
|
3天前
|
JSON API 数据格式
如何使用Flask开发RESTful API
RESTful API(Representational State Transferful Application Programming Interface)是一种基于 REST 架构风格设计的 Web 服务接口,用于实现资源的增删改查(CRUD)操作。它通过使用 HTTP 协议的不同方法(如 GET、POST、PUT、DELETE)和 URL 路径来对资源进行操作,并使用不同的状态码和数据格式进行响应。
12 1
|
7天前
|
安全 API 网络架构
构建高效的RESTful API:后端开发的最佳实践
【6月更文挑战第14天】在数字化时代,RESTful API是连接不同软件系统和促进数据交换的关键。本文将深入探讨如何设计、实现和维护一个高效、可扩展且安全的RESTful API,确保后端服务的响应性、可靠性和安全性。
|
1天前
|
安全 API 开发工具
微信开发:API接口与ipad协议的深度比较及最佳选择
微信开发:API接口与ipad协议的深度比较及最佳选择
|
1天前
|
API Android开发 iOS开发
个人微信开发API协议接口
个人微信开发API协议接口
|
1天前
|
API 开发工具
抖音sdk,抖音开发api接口
抖音sdk,抖音开发api接口
|
1天前
|
XML 自然语言处理 API
个人微信开发api文档
个人微信开发api文档
|
4天前
|
IDE Java API
如何使用Java和Spring Boot来开发一个基本的RESTful API
如何使用Java和Spring Boot来开发一个基本的RESTful API
10 0