/// <summary>
        /// 功能:建立报警上传通道(布防)
        /// </summary>
        /// <param name="userID">NET_DVR_Login ()的返回值.</param>
        /// <returns>返回值:-1表示失败,其他值作为NET_DVR_CloseAlarmChan()等函数的参数</returns>
        public int SetupAlarmChan(int userID, int unitno)
        {
            cbf_alarminfo = new CBF_AlarmInfo(CallBack_CBF);

            bool b = MP4Net_ClientAlarmSubscribe((IntPtr)userID, unitno, cbf_alarminfo);
            if (b)
                return 0;
            return -1;
        }
 private static extern bool MP4Net_ClientAlarmSubscribe(IntPtr hdev, int iusrdata, CBF_AlarmInfo cbf);