Beispiel #1
0
 public static extern void CLIENT_SetDVRMessCallBack(fMessCallBack cbmesscallback, IntPtr dwUser);
Beispiel #2
0
        /// <summary>
        /// 画面加载初始化处理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void frm_Main_Load(object sender, EventArgs e)
        {
            msgCallBack = new fMessCallBack(GetAlarmMessage);
            disConnect = new fDisConnect(DisConnectEvent);
            AlarmAudio = new byte[16];
            AlarmDiskErr = new byte[32];//DVR最大可挂32块硬盘,每一位表示一个硬盘的状态,0:硬盘状态正常;1:硬盘出错
            AlarmDiskFull = false;
            AlarmShelter = new byte[16];
            AlarmExternal = new byte[16];
            DHClient.DHInit(disConnect, IntPtr.Zero);
            DHClient.DHSetEncoding(LANGUAGE_ENCODING.gb2312);//字符编码格式设置,默认为gb2312字符编码,如果为其他字符编码请设置

            StringUtil.InitControlText(this);
        }
Beispiel #3
0
 public static extern void H264_DVR_SetDVRMessCallBack(fMessCallBack cbAlarmcallback, IntPtr lUser);
Beispiel #4
0
 public static extern void H264_DVR_SetDVRMessCallBack(fMessCallBack cbAlarmcallback, IntPtr lUser);
Beispiel #5
0
 private static extern void CLIENT_SetDVRMessCallBack(fMessCallBack cbMessage, IntPtr dwUser);
Beispiel #6
0
 /// <summary>
 /// Set up callback function of equipment information, in order to get the current information of the equipment
 /// </summary>
 /// <param name="cbMessage">callback parameter of message</param>
 /// <param name="dwUser">user data,if there is no data,please use IntPtr.Zero</param>
 public static void NETSetDVRMessCallBack(fMessCallBack cbMessage, IntPtr dwUser)
 {
     CLIENT_SetDVRMessCallBack(cbMessage, dwUser);
     //NETThrowLastError();
 }
 /// <summary>
 /// 进行设备设置初始化
 /// </summary>
 /// <param name="para">设备初始化设置参数</param>
 /// <param name="Acallback">消息回调(接收硬盘录像机消息)</param>
 /// <returns>执行结果代码:0 -  成功,1 - 设置连接时间和连接次数失败,2 - 设置硬盘录像机消息失败,3-设置硬盘录像机消息回调函数失败,4-设置显示模式失败</returns>
 public int SDKParaInit(SDKPlugInData.DeviceInitparameter para, SDKPlugInData.AllCallBack Acallback)
 {
     allcallback = Acallback;
     if (NET_DVR_SetConnectTime(para.WaitTime, para.TryTime))
     {
         return 1;
     }
     else
     {
         if (NET_DVR_SetDVRMessage(para.UserMessageCode, para.DVRMessageHWnd))
         {
             callback = new fMessCallBack(MessCallBack);
             if (NET_DVR_SetDVRMessCallBack(callback))
             {
                 if (!NET_DVR_SetShowMode(0, 0xff000000))
                 {
                     return 4;
                 }
             }
             else
             {
                 return 3;
             }
         }
         else
         {
             return 2;
         }
     }
     return 0;
 }
 private static extern bool NET_DVR_SetDVRMessCallBack(fMessCallBack myfMessCallBack);