public void refreshMotionInfo() { NETDEV_MOTION_ALARM_INFO_S stMotionAlarmInfo = new NETDEV_MOTION_ALARM_INFO_S(); stMotionAlarmInfo.awScreenInfo = new NETDEV_SCREENINFO_COLUMN_S[NETDEVSDK.NETDEV_SCREEN_INFO_ROW]; for (int i = 0; i < NETDEVSDK.NETDEV_SCREEN_INFO_ROW; i++) { stMotionAlarmInfo.awScreenInfo[i].columnInfo = new short[NETDEVSDK.NETDEV_SCREEN_INFO_COLUMN]; } Int32 dwBytesReturned = 0; int iRet = NETDEVSDK.NETDEV_GetDevConfig(m_deviceInfoList[m_oNetDemo.m_curSelectedTreeDeviceIndex].m_lpDevHandle, m_oNetDemo.m_curSelectedTreeChannelIndex + 1, (int)NETDEV_CONFIG_COMMAND_E.NETDEV_GET_MOTIONALARM, ref stMotionAlarmInfo, Marshal.SizeOf(stMotionAlarmInfo), ref dwBytesReturned); if (NETDEVSDK.TRUE != iRet) { m_oNetDemo.showFailLogInfo(m_deviceInfoList[m_oNetDemo.m_curSelectedTreeDeviceIndex].m_ip + " chl:" + (m_oNetDemo.m_curSelectedTreeChannelIndex + 1), "Get motion cfg", NETDEVSDK.NETDEV_GetLastError()); return; } m_oNetDemo.showSuccessLogInfo(m_deviceInfoList[m_oNetDemo.m_curSelectedTreeDeviceIndex].m_ip + " chl:" + (m_oNetDemo.m_curSelectedTreeChannelIndex + 1), "Get motion cfg"); if (stMotionAlarmInfo.dwObjectSize > MAXMOTIONOBJECTSIZE) { stMotionAlarmInfo.dwObjectSize = MAXMOTIONOBJECTSIZE; } m_deviceInfoList[m_oNetDemo.m_curSelectedTreeDeviceIndex].m_channelInfoList[m_oNetDemo.m_curSelectedTreeChannelIndex].m_MotionAlarmInfo.MotionAlarmInfo = stMotionAlarmInfo; m_deviceInfoList[m_oNetDemo.m_curSelectedTreeDeviceIndex].m_channelInfoList[m_oNetDemo.m_curSelectedTreeChannelIndex].m_MotionAlarmInfo.existFlag = true; m_oNetDemo.showMotionInfo(ref stMotionAlarmInfo); }