private void ProcessVideoCallDataCallBack(uint dwType, IntPtr lpBuffer, uint dwBufLen, IntPtr pUserData)
        {
            if (pUserData == null)
            {
                return;
            }

            if (dwType == (uint)CHCNetSDK.NET_SDK_CALLBACK_TYPE.NET_SDK_CALLBACK_TYPE_DATA)
            {
                CHCNetSDK.NET_DVR_VIDEO_CALL_PARAM struVideoCallParam = new CHCNetSDK.NET_DVR_VIDEO_CALL_PARAM();
                struVideoCallParam = (CHCNetSDK.NET_DVR_VIDEO_CALL_PARAM)Marshal.PtrToStructure(lpBuffer, typeof(CHCNetSDK.NET_DVR_VIDEO_CALL_PARAM));
                CHCNetSDK.PostMessage(pUserData, 1001, (int)struVideoCallParam.dwCmdType, 0);
            }
            else if (dwType == (uint)CHCNetSDK.NET_SDK_CALLBACK_TYPE.NET_SDK_CALLBACK_TYPE_STATUS)
            {
                uint dwStatus = (uint)Marshal.ReadInt32(lpBuffer);
                if (dwStatus == (uint)CHCNetSDK.NET_SDK_CALLBACK_STATUS_NORMAL.NET_SDK_CALLBACK_STATUS_SUCCESS)
                {
                    g_formList.AddLog(m_iDevIndex, AcsDemoPublic.OPERATION_SUCC_T, "Process Video Call Data Call Back Finish");
                }
                else if (dwStatus == (uint)CHCNetSDK.NET_SDK_CALLBACK_STATUS_NORMAL.NET_SDK_CALLBACK_STATUS_FAILED)
                {
                    g_formList.AddLog(m_iDevIndex, AcsDemoPublic.OPERATION_FAIL_T, "Process Video Call Data Call Back Failed");
                }
                else if (dwStatus == (uint)CHCNetSDK.NET_SDK_CALLBACK_STATUS_NORMAL.NET_SDK_CALLBACK_STATUS_EXCEPTION)
                {
                    g_formList.AddLog(m_iDevIndex, AcsDemoPublic.OPERATION_FAIL_T, "Process Video Call Data Call Back Exception");
                }
                else if (dwStatus == (uint)CHCNetSDK.NET_SDK_CALLBACK_STATUS_NORMAL.NET_SDK_CALLBACK_STATUS_PROCESSING)
                {
                    g_formList.AddLog(m_iDevIndex, AcsDemoPublic.OPERATION_SUCC_T, "Process Video Call Data Call Back Processing");
                }
            }
        }
        private void SendByeCmd()
        {
            if (m_lRemoteHandle < 0)
            {
                return;
            }

            CHCNetSDK.NET_DVR_VIDEO_CALL_PARAM struVideoCallParam = new CHCNetSDK.NET_DVR_VIDEO_CALL_PARAM();
            struVideoCallParam.dwSize    = (uint)Marshal.SizeOf(struVideoCallParam);
            struVideoCallParam.dwCmdType = 5;
            uint   dwSize = (uint)Marshal.SizeOf(struVideoCallParam);
            IntPtr ptrStruVideoCallParam = Marshal.AllocHGlobal((int)dwSize);

            Marshal.StructureToPtr(struVideoCallParam, ptrStruVideoCallParam, false);

            if (CHCNetSDK.NET_DVR_SendRemoteConfig(m_lRemoteHandle, 0, ptrStruVideoCallParam, dwSize))
            {
                g_formList.AddLog(m_iDevIndex, AcsDemoPublic.OPERATION_SUCC_T, "NET_DVR_SendRemoteConfig dwCmdType:" + struVideoCallParam.dwCmdType);
            }
            else
            {
                g_formList.AddLog(m_iDevIndex, AcsDemoPublic.OPERATION_FAIL_T, "NET_DVR_SendRemoteConfig dwCmdType:" + struVideoCallParam.dwCmdType);
            }
            Marshal.FreeHGlobal(ptrStruVideoCallParam);

            buttonCall.Show();
            buttonAnswer.Hide();
            buttonCancel.Hide();
            buttonHangUp.Hide();
        }