www.pudn.com > VBP-HKWS.zip > HCNetSDK.bas, change:2016-08-25,size:80648b


Attribute VB_Name = "HCNetSDK" 
Const SDK_PLAYMPEG4 = 1 '''播放库 
Const SDK_HCNETSDK = 2 '''网络库 
 
Const NAME_LEN = 32 '''用户名长度 
Const PASSWD_LEN = 16 '''密码长度 
Const GUID_LEN = 16 '      ''GUID长度 
Const DEV_TYPE_NAME_LEN = 24 '      ''设备类型名称长度 
Const MAX_NAMELEN = 16 '''DVR本地登陆名 
Const MAX_RIGHT = 32 '''设备支持的权限(1-12表示本地权限,13-32表示远程权限) 
Const SERIALNO_LEN = 48 '''序列号长度 
Const MACADDR_LEN = 6 '''mac地址长度 
Const MAX_ETHERNET = 2 '''设备可配以太网络 
Const MAX_NETWORK_CARD = 4 ' ''设备可配最大网卡数目 
Const PATHNAME_LEN = 128 '''路径长度 
 
Const MAX_NUMBER_LEN = 32 '   ''号码最大长度 
Const MAX_NAME_LEN = 128 ' ''设备名称最大长度 
 
Const MAX_TIMESEGMENT_V30 = 8 '''9000设备最大时间段数 
Const MAX_TIMESEGMENT = 4 '''8000设备最大时间段数 
Const MAX_ICR_NUM = 8 '   ''抓拍机红外滤光片预置点数 
 
Const MAX_SHELTERNUM = 4 '''8000设备最大遮挡区域数 
Const PHONENUMBER_LEN = 32 '''pppoe拨号号码最大长度 
 
Const MAX_DISKNUM = 16 '''8000设备最大硬盘数 
Const MAX_DISKNUM_V10 = 8 '''1.2版本之前版本 
 
Const MAX_WINDOW_V30 = 32 '''9000设备本地显示最大播放窗口数 
Const MAX_WINDOW = 16 '''8000设备最大硬盘数 
Const MAX_VGA_V30 = 4 '''9000设备最大可接VGA数 
Const MAX_VGA = 1 '''8000设备最大可接VGA数 
 
Const MAX_USERNUM_V30 = 32 '''9000设备最大用户数 
Const MAX_USERNUM = 16 '''8000设备最大用户数 
Const MAX_EXCEPTIONNUM_V30 = 32 '''9000设备最大异常处理数 
Const MAX_EXCEPTIONNUM = 16 '''8000设备最大异常处理数 
Const MAX_LINK = 6 '''8000设备单通道最大视频流连接数 
Const MAX_ITC_EXCEPTIONOUT = 32 '''抓拍机最大报警输出 
 
Const MAX_DECPOOLNUM = 4 '''单路解码器每个解码通道最大可循环解码数 
Const MAX_DECNUM = 4 '''单路解码器的最大解码通道数(实际只有一个,其他三个保留) 
Const MAX_TRANSPARENTNUM = 2 '''单路解码器可配置最大透明通道数 
Const MAX_CYCLE_CHAN = 16 ' ''单路解码器最大轮循通道数 
Const MAX_CYCLE_CHAN_V30 = 64 '''最大轮询通道数(扩展) 
Const MAX_DIRNAME_LENGTH = 80 '''最大目录长度 
 
Const MAX_STRINGNUM_V30 = 8 '''9000设备最大OSD字符行数数 
Const MAX_STRINGNUM = 4 '''8000设备最大OSD字符行数数 
Const MAX_STRINGNUM_EX = 8 '''8000定制扩展 
Const MAX_AUXOUT_V30 = 16 '''9000设备最大辅助输出数 
Const MAX_AUXOUT = 4 '''8000设备最大辅助输出数 
Const MAX_HD_GROUP = 16 '''9000设备最大硬盘组数 
Const MAX_NFS_DISK = 8 ' ''8000设备最大NFS硬盘数 
 
Const IW_ESSID_MAX_SIZE = 32 '''WIFI的SSID号长度 
Const IW_ENCODING_TOKEN_MAX = 32 '''WIFI密锁最大字节数 
Const WIFI_WEP_MAX_KEY_COUNT = 4 ' 
Const WIFI_WEP_MAX_KEY_LENGTH = 33 ' 
Const WIFI_WPA_PSK_MAX_KEY_LENGTH = 63 ' 
Const WIFI_WPA_PSK_MIN_KEY_LENGTH = 8 ' 
Const WIFI_MAX_AP_COUNT = 20 ' 
Const MAX_SERIAL_NUM = 64 '''最多支持的透明通道路数 
Const MAX_DDNS_NUMS = 10 '''9000设备最大可配ddns数 
Const MAX_EMAIL_ADDR_LEN = 48 '''最大email地址长度 
Const MAX_EMAIL_PWD_LEN = 32 '''最大email密码长度 
 
Const MAXPROGRESS = 100 '''回放时的最大百分率 
Const MAX_SERIALNUM = 2 '''8000设备支持的串口数 1-232, 2-485 
Const CARDNUM_LEN = 20 '''卡号长度 
Const CARDNUM_LEN_OUT = 32 ' ''外部结构体卡号长度 
Const MAX_VIDEOOUT_V30 = 4 '''9000设备的视频输出数 
Const MAX_VIDEOOUT = 2 '''8000设备的视频输出数 
 
Const MAX_PRESET_V30 = 256 ''' 9000设备支持的云台预置点数 
Const MAX_TRACK_V30 = 256 ''' 9000设备支持的云台轨迹数 
Const MAX_CRUISE_V30 = 256 ''' 9000设备支持的云台巡航数 
Const MAX_PRESET = 128 ''' 8000设备支持的云台预置点数 
Const MAX_TRACK = 128 ''' 8000设备支持的云台轨迹数 
Const MAX_CRUISE = 128 ''' 8000设备支持的云台巡航数 
 
Const CRUISE_MAX_PRESET_NUMS = 32 ''' 一条巡航最多的巡航点 
 
Const MAX_SERIAL_PORT = 8 '''9000设备支持232串口数 
Const MAX_PREVIEW_MODE = 8 ''' 设备支持最大预览模式数目 1画面,4画面,9画面,16画面.... 
Const MAX_MATRIXOUT = 16 ''' 最大模拟矩阵输出个数 
Const LOG_INFO_LEN = 11840 ' '' 日志附加信息 
Const DESC_LEN = 16 ''' 云台描述字符串长度 
Const PTZ_PROTOCOL_NUM = 200 ''' 9000最大支持的云台协议数 
 
Const MAX_AUDIO = 1 '''8000语音对讲通道数 
Const MAX_AUDIO_V30 = 2 '''9000语音对讲通道数 
Const MAX_CHANNUM = 16 '''8000设备最大通道数 
Const MAX_ALARMIN = 16 '''8000设备最大报警输入数 
Const MAX_ALARMOUT = 4 '''8000设备最大报警输出数 
''9000 IPC接入 
Const MAX_ANALOG_CHANNUM = 32 '''最大32个模拟通道 
Const MAX_ANALOG_ALARMOUT = 32 ' ''最大32路模拟报警输出 
Const MAX_ANALOG_ALARMIN = 32 '''最大32路模拟报警输入 
 
Const MAX_IP_DEVICE = 32 '''允许接入的最大IP设备数 
Const MAX_IP_DEVICE_V40 = 64 '''允许接入的最大IP设备数 
Const MAX_IP_CHANNEL = 32 '''允许加入的最多IP通道数 
Const MAX_IP_ALARMIN = 128 '''允许加入的最多报警输入数 
Const MAX_IP_ALARMOUT = 64 '''允许加入的最多报警输出数 
Const MAX_IP_ALARMIN_V40 = 4096 '    ''允许加入的最多报警输入数 
Const MAX_IP_ALARMOUT_V40 = 4096 '    ''允许加入的最多报警输出数 
 
Const MAX_RECORD_FILE_NUM = 20 '      '' 每次删除或者刻录的最大文件数 
 
''SDK_V31 ATM 
Const MAX_ATM_NUM = 1 ' 
Const MAX_ACTION_TYPE = 12 ' 
Const ATM_FRAMETYPE_NUM = 4 ' 
Const MAX_ATM_PROTOCOL_NUM = 1025 ' 
Const ATM_PROTOCOL_SORT = 4 ' 
Const ATM_DESC_LEN = 32 ' 
'' SDK_V31 ATM 
 
'* 最大支持的通道数 最大模拟加上最大IP支持 *' 
Const MAX_CHANNUM_V30 = MAX_ANALOG_CHANNUM + MAX_IP_CHANNEL '''64 
Const MAX_ALARMOUT_V30 = MAX_ANALOG_ALARMOUT + MAX_IP_ALARMOUT '''96 
Const MAX_ALARMIN_V30 = MAX_ANALOG_ALARMIN + MAX_IP_ALARMIN '''160 
 
Const MAX_CHANNUM_V40 = 512 ' 
Const MAX_ALARMOUT_V40 = MAX_IP_ALARMOUT_V40 + MAX_ANALOG_ALARMOUT '''4128 
Const MAX_ALARMIN_V40 = MAX_IP_ALARMIN_V40 + MAX_ANALOG_ALARMOUT '''4128 
 
Const MAX_HUMAN_PICTURE_NUM = 10 '   ''最大照片数 
Const MAX_HUMAN_BIRTHDATE_LEN = 10 ' 
 
Const MAX_LAYERNUMS = 32 ' 
 
Const MAX_ROIDETECT_NUM = 8 '    ''支持的ROI区域数 
Const MAX_LANERECT_NUM = 5      '    ''最大车牌识别区域数 
Const MAX_FORTIFY_NUM = 10       '   ''最大布防个数 
Const MAX_INTERVAL_NUM = 4      '    ''最大时间间隔个数 
Const MAX_CHJC_NUM = 3          '    ''最大车辆省份简称字符个数 
Const MAX_VL_NUM = 5            '    ''最大虚拟线圈个数 
Const MAX_DRIVECHAN_NUM = 16     '   ''最大车道数 
Const MAX_COIL_NUM = 3          '    ''最大线圈个数 
Const MAX_SIGNALLIGHT_NUM = 6   '   ''最大信号灯个数 
Const LEN_32 = 32              ' 
Const LEN_31 = 31              ' 
Const MAX_CABINET_COUNT = 8     '    ''最大支持机柜数量 
Const MAX_ID_LEN = 48            ' 
Const MAX_PARKNO_LEN = 16        ' 
Const MAX_ALARMREASON_LEN = 32   ' 
Const MAX_UPGRADE_INFO_LEN = 48  ' ''获取升级文件匹配信息(模糊升级) 
Const MAX_CUSTOMDIR_LEN = 32     ' ''自定义目录长度 
 
Const MAX_TRANSPARENT_CHAN_NUM = 4    '   ''每个串口允许建立的最大透明通道数 
Const MAX_TRANSPARENT_ACCESS_NUM = 4  '   ''每个监听端口允许接入的最大主机数 
 
''ITS 
Const MAX_PARKING_STATUS = 8     '    ''车位状态 0代表无车,1代表有车,2代表压线(优先级最高), 3特殊车位 
Const MAX_PARKING_NUM = 4           '    ''一个通道最大4个车位 (从左到右车位 数组0~3) 
 
Const MAX_ITS_SCENE_NUM = 16      '   ''最大场景数量 
Const MAX_SCENE_TIMESEG_NUM = 16  '   ''最大场景时间段数量 
Const MAX_IVMS_IP_CHANNEL = 128    '  ''最大IP通道数 
Const DEVICE_ID_LEN = 48          '   ''设备编号长度 
Const MONITORSITE_ID_LEN = 48     '   ''监测点编号长度 
Const MAX_AUXAREA_NUM = 16        '   ''辅助区域最大数目 
Const MAX_SLAVE_CHANNEL_NUM = 16  '   ''最大从通道数量 
 
Const MAX_SCH_TASKS_NUM = 10 ' 
 
Const MAX_SERVERID_LEN = 64          ' ''最大服务器ID的长度 
Const MAX_SERVERDOMAIN_LEN = 128      ' ''服务器域名最大长度 
Const MAX_AUTHENTICATEID_LEN = 64    ' ''认证ID最大长度 
Const MAX_AUTHENTICATEPASSWD_LEN = 32 ' ''认证密码最大长度 
Const MAX_SERVERNAME_LEN = 64        ' ''最大服务器用户名 
Const MAX_COMPRESSIONID_LEN = 64     ' ''编码ID的最大长度 
Const MAX_SIPSERVER_ADDRESS_LEN = 128 ' ''SIP服务器地址支持域名和IP地址 
''压线报警 
Const MAX_PlATE_NO_LEN = 32       '   ''车牌号码最大长度 2013-09-27 
Const UPNP_PORT_NUM = 12       '   ''upnp端口映射端口数目 
 
 
Const MAX_LOCAL_ADDR_LEN = 96 '       ''SOCKS最大本地网段个数 
Const MAX_COUNTRY_NAME_LEN = 4 '      ''国家简写名称长度 
 
''码流连接方式 
Const NORMALCONNECT = 1 ' 
Const MEDIACONNECT = 2 ' 
 
''设备型号(大类) 
Const HCDVR = 1 ' 
Const MEDVR = 2 ' 
Const PCDVR = 3 ' 
Const HC_9000 = 4 ' 
Const HF_I = 5 ' 
Const PCNVR = 6 ' 
Const HC_76NVR = 8 ' 
 
''NVR类型 
Const DS8000HC_NVR = 0 ' 
Const DS9000HC_NVR = 1 ' 
Const DS8000ME_NVR = 2 ' 
 
'*******************全局错误码 begin**********************' 
Const NET_DVR_NOERROR = 0 '''没有错误 
Const NET_DVR_PASSWORD_ERROR = 1 '''用户名密码错误 
Const NET_DVR_NOENOUGHPRI = 2 '''权限不足 
Const NET_DVR_NOINIT = 3 '''没有初始化 
Const NET_DVR_CHANNEL_ERROR = 4 '''通道号错误 
Const NET_DVR_OVER_MAXLINK = 5 '''连接到DVR的客户端个数超过最大 
Const NET_DVR_VERSIONNOMATCH = 6 '''版本不匹配 
Const NET_DVR_NETWORK_FAIL_CONNECT = 7 '''连接服务器失败 
Const NET_DVR_NETWORK_SEND_ERROR = 8 '''向服务器发送失败 
Const NET_DVR_NETWORK_RECV_ERROR = 9 '''从服务器接收数据失败 
Const NET_DVR_NETWORK_RECV_TIMEOUT = 10 '''从服务器接收数据超时 
Const NET_DVR_NETWORK_ERRORDATA = 11 '''传送的数据有误 
Const NET_DVR_ORDER_ERROR = 12 '''调用次序错误 
Const NET_DVR_OPERNOPERMIT = 13 '''无此权限 
Const NET_DVR_COMMANDTIMEOUT = 14 '''DVR命令执行超时 
Const NET_DVR_ERRORSERIALPORT = 15 '''串口号错误 
Const NET_DVR_ERRORALARMPORT = 16 '''报警端口错误 
Const NET_DVR_PARAMETER_ERROR = 17 '''参数错误 
Const NET_DVR_CHAN_EXCEPTION = 18 '''服务器通道处于错误状态 
Const NET_DVR_NODISK = 19 '''没有硬盘 
Const NET_DVR_ERRORDISKNUM = 20 '''硬盘号错误 
Const NET_DVR_DISK_FULL = 21 '''服务器硬盘满 
Const NET_DVR_DISK_ERROR = 22 '''服务器硬盘出错 
Const NET_DVR_NOSUPPORT = 23 '''服务器不支持 
Const NET_DVR_BUSY = 24 '''服务器忙 
Const NET_DVR_MODIFY_FAIL = 25 '''服务器修改不成功 
Const NET_DVR_PASSWORD_FORMAT_ERROR = 26 '''密码输入格式不正确 
Const NET_DVR_DISK_FORMATING = 27 '''硬盘正在格式化,不能启动操作 
Const NET_DVR_DVRNORESOURCE = 28 '''DVR资源不足 
Const NET_DVR_DVROPRATEFAILED = 29 '''DVR操作失败 
Const NET_DVR_OPENHOSTSOUND_FAIL = 30 '''打开PC声音失败 
Const NET_DVR_DVRVOICEOPENED = 31 '''服务器语音对讲被占用 
Const NET_DVR_TIMEINPUTERROR = 32 '''时间输入不正确 
Const NET_DVR_NOSPECFILE = 33 '''回放时服务器没有指定的文件 
Const NET_DVR_CREATEFILE_ERROR = 34 '''创建文件出错 
Const NET_DVR_FILEOPENFAIL = 35 '''打开文件出错 
Const NET_DVR_OPERNOTFINISH = 36 ' ''上次的操作还没有完成 
Const NET_DVR_GETPLAYTIMEFAIL = 37 '''获取当前播放的时间出错 
Const NET_DVR_PLAYFAIL = 38 '''播放出错 
Const NET_DVR_FILEFORMAT_ERROR = 39 '''文件格式不正确 
Const NET_DVR_DIR_ERROR = 40 '''路径错误 
Const NET_DVR_ALLOC_RESOURCE_ERROR = 41 '''资源分配错误 
Const NET_DVR_AUDIO_MODE_ERROR = 42 '''声卡模式错误 
Const NET_DVR_NOENOUGH_BUF = 43 '''缓冲区太小 
Const NET_DVR_CREATESOCKET_ERROR = 44 '''创建SOCKET出错 
Const NET_DVR_SETSOCKET_ERROR = 45 '''设置SOCKET出错 
Const NET_DVR_MAX_NUM = 46 '''个数达到最大 
Const NET_DVR_USERNOTEXIST = 47 '''用户不存在 
Const NET_DVR_WRITEFLASHERROR = 48 '''写FLASH出错 
Const NET_DVR_UPGRADEFAIL = 49 '''DVR升级失败 
Const NET_DVR_CARDHAVEINIT = 50 '''解码卡已经初始化过 
Const NET_DVR_PLAYERFAILED = 51 '''调用播放库中某个函数失败 
Const NET_DVR_MAX_USERNUM = 52 '''设备端用户数达到最大 
Const NET_DVR_GETLOCALIPANDMACFAIL = 53 '''获得客户端的IP地址或物理地址失败 
Const NET_DVR_NOENCODEING = 54 '''该通道没有编码 
Const NET_DVR_IPMISMATCH = 55 '''IP地址不匹配 
Const NET_DVR_MACMISMATCH = 56 '''MAC地址不匹配 
Const NET_DVR_UPGRADELANGMISMATCH = 57 '''升级文件语言不匹配 
Const NET_DVR_MAX_PLAYERPORT = 58 '''播放器路数达到最大 
Const NET_DVR_NOSPACEBACKUP = 59 '''备份设备中没有足够空间进行备份 
Const NET_DVR_NODEVICEBACKUP = 60 '''没有找到指定的备份设备 
Const NET_DVR_PICTURE_BITS_ERROR = 61 '''图像素位数不符,限24色 
Const NET_DVR_PICTURE_DIMENSION_ERROR = 62 '''图片高*宽超限, 限128*256 
Const NET_DVR_PICTURE_SIZ_ERROR = 63 '''图片大小超限,限100K 
Const NET_DVR_LOADPLAYERSDKFAILED = 64 '''载入当前目录下Player Sdk出错 
Const NET_DVR_LOADPLAYERSDKPROC_ERROR = 65 '''找不到Player Sdk中某个函数入口 
Const NET_DVR_LOADDSSDKFAILED = 66 '''载入当前目录下DSsdk出错 
Const NET_DVR_LOADDSSDKPROC_ERROR = 67 '''找不到DsSdk中某个函数入口 
Const NET_DVR_DSSDK_ERROR = 68 '''调用硬解码库DsSdk中某个函数失败 
Const NET_DVR_VOICEMONOPOLIZE = 69 '''声卡被独占 
Const NET_DVR_JOINMULTICASTFAILED = 70 '''加入多播组失败 
Const NET_DVR_CREATEDIR_ERROR = 71 '''建立日志文件目录失败 
Const NET_DVR_BINDSOCKET_ERROR = 72 '''绑定套接字失败 
Const NET_DVR_SOCKETCLOSE_ERROR = 73 '''socket连接中断,此错误通常是由于连接中断或目的地不可达 
Const NET_DVR_USERID_ISUSING = 74 '''注销时用户ID正在进行某操作 
Const NET_DVR_SOCKETLISTEN_ERROR = 75 '''监听失败 
Const NET_DVR_PROGRAM_EXCEPTION = 76 '''程序异常 
Const NET_DVR_WRITEFILE_FAILED = 77 '''写文件失败 
Const NET_DVR_FORMAT_READONLY = 78 '''禁止格式化只读硬盘 
Const NET_DVR_WITHSAMEUSERNAME = 79 '''用户配置结构中存在相同的用户名 
Const NET_DVR_DEVICETYPE_ERROR = 80 '''导入参数时设备型号不匹配 
Const NET_DVR_LANGUAGE_ERROR = 81 '''导入参数时语言不匹配 
Const NET_DVR_PARAVERSION_ERROR = 82 '''导入参数时软件版本不匹配 
Const NET_DVR_IPCHAN_NOTALIVE = 83 ' ''预览时外接IP通道不在线 
Const NET_DVR_RTSP_SDK_ERROR = 84 '''加载高清IPC通讯库StreamTransClient.dll失败 
Const NET_DVR_CONVERT_SDK_ERROR = 85 '''加载转码库失败 
Const NET_DVR_IPC_COUNT_OVERFLOW = 86 '''超出最大的ip接入通道数 
 
Const NET_PLAYM4_NOERROR = 500 '''no error 
Const NET_PLAYM4_PARA_OVER = 501 '''input parameter is invalid 
Const NET_PLAYM4_ORDER_ERROR = 502 '''The order of the function to be called is error 
Const NET_PLAYM4_TIMER_ERROR = 503 '''Create multimedia clock failed 
Const NET_PLAYM4_DEC_VIDEO_ERROR = 504 '''Decode video data failed 
Const NET_PLAYM4_DEC_AUDIO_ERROR = 505 '''Decode audio data failed 
Const NET_PLAYM4_ALLOC_MEMORY_ERROR = 506 '''Allocate memory failed 
Const NET_PLAYM4_OPEN_FILE_ERROR = 507 '''Open the file failed 
Const NET_PLAYM4_CREATE_OBJ_ERROR = 508 '''Create thread or event failed 
Const NET_PLAYM4_CREATE_DDRAW_ERROR = 509 '''Create DirectDraw object failed 
Const NET_PLAYM4_CREATE_OFFSCREEN_ERROR = 510 '''failed when creating off-screen surface 
Const NET_PLAYM4_BUF_OVER = 511 '''buffer is overflow 
Const NET_PLAYM4_CREATE_SOUND_ERROR = 512 '''failed when creating audio device 
Const NET_PLAYM4_SET_VOLUME_ERROR = 513 '''Set volume failed 
Const NET_PLAYM4_SUPPORT_FILE_ONLY = 514 '''The function only support play file 
Const NET_PLAYM4_SUPPORT_STREAM_ONLY = 515 '''The function only support play stream 
Const NET_PLAYM4_SYS_NOT_SUPPORT = 516 '''System not support 
Const NET_PLAYM4_FILEHEADER_UNKNOWN = 517 '''No file header 
Const NET_PLAYM4_VERSION_INCORRECT = 518 '''The version of decoder and encoder is not adapted 
Const NET_PALYM4_INIT_DECODER_ERROR = 519 '''Initialize decoder failed 
Const NET_PLAYM4_CHECK_FILE_ERROR = 520 '''The file data is unknown 
Const NET_PLAYM4_INIT_TIMER_ERROR = 521 '''Initialize multimedia clock failed 
Const NET_PLAYM4_BLT_ERROR = 522 '''Blt failed 
Const NET_PLAYM4_UPDATE_ERROR = 523 '''Update failed 
Const NET_PLAYM4_OPEN_FILE_ERROR_MULTI = 524 '''openfile error, streamtype is multi 
Const NET_PLAYM4_OPEN_FILE_ERROR_VIDEO = 525 '''openfile error, streamtype is video 
Const NET_PLAYM4_JPEG_COMPRESS_ERROR = 526 '''JPEG compress error 
Const NET_PLAYM4_EXTRACT_NOT_SUPPORT = 527 '''Don't support the version of this file 
Const NET_PLAYM4_EXTRACT_DATA_ERROR = 528 '''extract video data failed 
'*******************全局错误码 end**********************' 
 
'************************************************* 
'NET_DVR_IsSupport()返回值 
'1-9位分别表示以下信息(位与是TRUE)表示支持' 
'**************************************************' 
Const NET_DVR_SUPPORT_DDRAW = 1 '''支持DIRECTDRAW,如果不支持,则播放器不能工作 
Const NET_DVR_SUPPORT_BLT = 2 '''显卡支持BLT操作,如果不支持,则播放器不能工作 
Const NET_DVR_SUPPORT_BLTFOURCC = 4 '''显卡BLT支持颜色转换,如果不支持,播放器会用软件方法作RGB转换 
Const NET_DVR_SUPPORT_BLTSHRINKX = 8 '''显卡BLT支持X轴缩小'如果不支持,系统会用软件方法转换 
Const NET_DVR_SUPPORT_BLTSHRINKY = 16 '''显卡BLT支持Y轴缩小'如果不支持,系统会用软件方法转换 
Const NET_DVR_SUPPORT_BLTSTRETCHX = 32 '''显卡BLT支持X轴放大'如果不支持,系统会用软件方法转换 
Const NET_DVR_SUPPORT_BLTSTRETCHY = 64 '''显卡BLT支持Y轴放大'如果不支持,系统会用软件方法转换 
Const NET_DVR_SUPPORT_SSE = 128 '''CPU支持SSE指令,Intel Pentium3以上支持SSE指令 
Const NET_DVR_SUPPORT_MMX = 256 '''CPU支持MMX指令集,Intel Pentium3以上支持SSE指令 
 
'**********************云台控制命令 begin*************************' 
Const LIGHT_PWRON = 2 ''' 接通灯光电源 
Const WIPER_PWRON = 3 ''' 接通雨刷开关 
Const FAN_PWRON = 4 ''' 接通风扇开关 
Const HEATER_PWRON = 5 ''' 接通加热器开关 
Const AUX_PWRON1 = 6 ''' 接通辅助设备开关 
Const AUX_PWRON2 = 7 ''' 接通辅助设备开关 
Const SET_PRESET = 8 ''' 设置预置点 
Const CLE_PRESET = 9 ''' 清除预置点 
 
Const ZOOM_IN = 11 ''' 焦距以速度SS变大(倍率变大) 
Const ZOOM_OUT = 12 ''' 焦距以速度SS变小(倍率变小) 
Const FOCUS_NEAR = 13 ''' 焦点以速度SS前调 
Const FOCUS_FAR = 14 ''' 焦点以速度SS后调 
Const IRIS_OPEN = 15 ''' 光圈以速度SS扩大 
Const IRIS_CLOSE = 16 ''' 光圈以速度SS缩小 
 
Const TILT_UP = 21 ''* 云台以SS的速度上仰 *' 
Const TILT_DOWN = 22 ''* 云台以SS的速度下俯 *' 
Const PAN_LEFT = 23 ''* 云台以SS的速度左转 *' 
Const PAN_RIGHT = 24 ''* 云台以SS的速度右转 *' 
Const UP_LEFT = 25 ''* 云台以SS的速度上仰和左转 *' 
Const UP_RIGHT = 26 ''* 云台以SS的速度上仰和右转 *' 
Const DOWN_LEFT = 27 ''* 云台以SS的速度下俯和左转 *' 
Const DOWN_RIGHT = 28 ''* 云台以SS的速度下俯和右转 *' 
Const PAN_AUTO = 29 ''* 云台以SS的速度左右自动扫描 *' 
 
Const FILL_PRE_SEQ = 30 ''* 将预置点加入巡航序列 *' 
Const SET_SEQ_DWELL = 31 ''* 设置巡航点停顿时间 *' 
Const SET_SEQ_SPEED = 32 ''* 设置巡航速度 *' 
Const CLE_PRE_SEQ = 33 ''* 将预置点从巡航序列中删除 *' 
Const STA_MEM_CRUISE = 34 ''* 开始记录轨迹 *' 
Const STO_MEM_CRUISE = 35 ''* 停止记录轨迹 *' 
Const RUN_CRUISE = 36 ''* 开始轨迹 *' 
Const RUN_SEQ = 37 ''* 开始巡航 *' 
Const STOP_SEQ = 38 ''* 停止巡航 *' 
Const GOTO_PRESET = 39 ''* 快球转到预置点 *' 
'**********************云台控制命令 end*************************' 
 
'************************************************* 
'回放时播放控制命令宏定义 
'NET_DVR_PlayBackControl 
'NET_DVR_PlayControlLocDisplay 
'NET_DVR_DecPlayBackCtrl的宏定义 
'具体支持查看函数说明和代码 
'**************************************************' 
Const NET_DVR_PLAYSTART = 1 '''开始播放 
Const NET_DVR_PLAYSTOP = 2 '''停止播放 
Const NET_DVR_PLAYPAUSE = 3 '''暂停播放 
Const NET_DVR_PLAYRESTART = 4 '''恢复播放 
Const NET_DVR_PLAYFAST = 5 '''快放 
Const NET_DVR_PLAYSLOW = 6 '''慢放 
Const NET_DVR_PLAYNORMAL = 7 '''正常速度 
Const NET_DVR_PLAYFRAME = 8 '''单帧放 
Const NET_DVR_PLAYSTARTAUDIO = 9 '''打开声音 
Const NET_DVR_PLAYSTOPAUDIO = 10 '''关闭声音 
Const NET_DVR_PLAYAUDIOVOLUME = 11 '''调节音量 
Const NET_DVR_PLAYSETPOS = 12 '''改变文件回放的进度 
Const NET_DVR_PLAYGETPOS = 13 '''获取文件回放的进度 
Const NET_DVR_PLAYGETTIME = 14 '''获取当前已经播放的时间(按文件回放的时候有效) 
Const NET_DVR_PLAYGETFRAME = 15 '''获取当前已经播放的帧数(按文件回放的时候有效) 
Const NET_DVR_GETTOTALFRAMES = 16 '''获取当前播放文件总的帧数(按文件回放的时候有效) 
Const NET_DVR_GETTOTALTIME = 17 '''获取当前播放文件总的时间(按文件回放的时候有效) 
Const NET_DVR_THROWBFRAME = 20 '''丢B帧 
Const NET_DVR_SETSPEED = 24 '''设置码流速度 
Const NET_DVR_KEEPALIVE = 25 '''保持与设备的心跳(如果回调阻塞,建议2秒发送一次) 
Const NET_DVR_PLAYSETTIME = 26 '''按绝对时间定位 
Const NET_DVR_PLAYGETTOTALLEN = 27 '''获取按时间回放对应时间段内的所有文件的总长度 
Const NET_DVR_PLAY_FORWARD = 29 '''倒放切换为正放 
Const NET_DVR_PLAY_REVERSE = 30 '''正放切换为倒放 
Const NET_DVR_SET_TRANS_TYPE = 32 '''设置转封装类型 
Const NET_DVR_PLAY_CONVERT = 33 '''正放切换为倒放 
 
''远程按键定义如下: 
'* key value send to CONFIG program *' 
Const KEY_CODE_1 = 1 ' 
Const KEY_CODE_2 = 2 ' 
Const KEY_CODE_3 = 3 ' 
Const KEY_CODE_4 = 4 ' 
Const KEY_CODE_5 = 5 ' 
Const KEY_CODE_6 = 6 ' 
Const KEY_CODE_7 = 7 ' 
Const KEY_CODE_8 = 8 ' 
Const KEY_CODE_9 = 9 ' 
Const KEY_CODE_0 = 10 ' 
Const KEY_CODE_POWER = 11 ' 
Const KEY_CODE_MENU = 12 ' 
Const KEY_CODE_ENTER = 13 ' 
Const KEY_CODE_CANCEL = 14 ' 
Const KEY_CODE_UP = 15 ' 
Const KEY_CODE_DOWN = 16 ' 
Const KEY_CODE_LEFT = 17 ' 
Const KEY_CODE_RIGHT = 18 ' 
Const KEY_CODE_EDIT = 19 ' 
Const KEY_CODE_ADD = 20 ' 
Const KEY_CODE_MINUS = 21 ' 
Const KEY_CODE_PLAY = 22 ' 
Const KEY_CODE_REC = 23 ' 
Const KEY_CODE_PAN = 24 ' 
Const KEY_CODE_M = 25 ' 
Const KEY_CODE_A = 26 ' 
Const KEY_CODE_F1 = 27 ' 
Const KEY_CODE_F2 = 28 ' 
 
'* for PTZ control *' 
Const KEY_PTZ_UP_START = KEY_CODE_UP ' 
Const KEY_PTZ_UP_STOP = 32 ' 
 
Const KEY_PTZ_DOWN_START = KEY_CODE_DOWN ' 
Const KEY_PTZ_DOWN_STOP = 33 ' 
 
 
Const KEY_PTZ_LEFT_START = KEY_CODE_LEFT ' 
Const KEY_PTZ_LEFT_STOP = 34 ' 
 
Const KEY_PTZ_RIGHT_START = KEY_CODE_RIGHT ' 
Const KEY_PTZ_RIGHT_STOP = 35 ' 
 
Const KEY_PTZ_AP1_START = KEY_CODE_EDIT ''* 光圈+ *' 
Const KEY_PTZ_AP1_STOP = 36 ' 
 
Const KEY_PTZ_AP2_START = KEY_CODE_PAN ''* 光圈- *' 
Const KEY_PTZ_AP2_STOP = 37 ' 
 
Const KEY_PTZ_FOCUS1_START = KEY_CODE_A ''* 聚焦+ *' 
Const KEY_PTZ_FOCUS1_STOP = 38 ' 
 
Const KEY_PTZ_FOCUS2_START = KEY_CODE_M ''* 聚焦- *' 
Const KEY_PTZ_FOCUS2_STOP = 39 ' 
 
Const KEY_PTZ_B1_START = 40 ''* 变倍+ *' 
Const KEY_PTZ_B1_STOP = 41 ' 
 
Const KEY_PTZ_B2_START = 42 ''* 变倍- *' 
Const KEY_PTZ_B2_STOP = 43 ' 
 
''9000新增 
Const KEY_CODE_11 = 44 ' 
Const KEY_CODE_12 = 45 ' 
Const KEY_CODE_13 = 46 ' 
Const KEY_CODE_14 = 47 ' 
Const KEY_CODE_15 = 48 ' 
Const KEY_CODE_16 = 49 ' 
 
'*************************参数配置命令 begin*******************************' 
''用于NET_DVR_SetDVRConfig和NET_DVR_GetDVRConfig,注意其对应的配置结构 
Const NET_DVR_GET_DEVICECFG = 100 '''获取设备参数 
Const NET_DVR_SET_DEVICECFG = 101 '''设置设备参数 
Const NET_DVR_GET_NETCFG = 102 '''获取网络参数 
Const NET_DVR_SET_NETCFG = 103 '''设置网络参数 
Const NET_DVR_GET_PICCFG = 104 '''获取图象参数 
Const NET_DVR_SET_PICCFG = 105 '''设置图象参数 
Const NET_DVR_GET_COMPRESSCFG = 106 '''获取压缩参数 
Const NET_DVR_SET_COMPRESSCFG = 107 '''设置压缩参数 
Const NET_DVR_GET_RECORDCFG = 108 '''获取录像时间参数 
Const NET_DVR_SET_RECORDCFG = 109 '''设置录像时间参数 
Const NET_DVR_GET_DECODERCFG = 110 '''获取解码器参数 
Const NET_DVR_SET_DECODERCFG = 111 '''设置解码器参数 
Const NET_DVR_GET_RS232CFG = 112 '''获取232串口参数 
Const NET_DVR_SET_RS232CFG = 113 '''设置232串口参数 
Const NET_DVR_GET_ALARMINCFG = 114 '''获取报警输入参数 
Const NET_DVR_SET_ALARMINCFG = 115 '''设置报警输入参数 
Const NET_DVR_GET_ALARMOUTCFG = 116 '''获取报警输出参数 
Const NET_DVR_SET_ALARMOUTCFG = 117 '''设置报警输出参数 
Const NET_DVR_GET_TIMECFG = 118 '''获取DVR时间 
Const NET_DVR_SET_TIMECFG = 119 '''设置DVR时间 
Const NET_DVR_GET_PREVIEWCFG = 120 '''获取预览参数 
Const NET_DVR_SET_PREVIEWCFG = 121 '''设置预览参数 
Const NET_DVR_GET_VIDEOOUTCFG = 122 '''获取视频输出参数 
Const NET_DVR_SET_VIDEOOUTCFG = 123 '''设置视频输出参数 
Const NET_DVR_GET_USERCFG = 124 '''获取用户参数 
Const NET_DVR_SET_USERCFG = 125 '''设置用户参数 
Const NET_DVR_GET_EXCEPTIONCFG = 126 '''获取异常参数 
Const NET_DVR_SET_EXCEPTIONCFG = 127 '''设置异常参数 
Const NET_DVR_GET_ZONEANDDST = 128 '''获取时区和夏时制参数 
Const NET_DVR_SET_ZONEANDDST = 129 '''设置时区和夏时制参数 
Const NET_DVR_GET_SHOWSTRING = 130 '''获取叠加字符参数 
Const NET_DVR_SET_SHOWSTRING = 131 '''设置叠加字符参数 
Const NET_DVR_GET_EVENTCOMPCFG = 132 '''获取事件触发录像参数 
Const NET_DVR_SET_EVENTCOMPCFG = 133 '''设置事件触发录像参数 
 
Const NET_DVR_GET_AUXOUTCFG = 140 '''获取报警触发辅助输出设置(HS设备辅助输出2006-02-28) 
Const NET_DVR_SET_AUXOUTCFG = 141 '''设置报警触发辅助输出设置(HS设备辅助输出2006-02-28) 
Const NET_DVR_GET_PREVIEWCFG_AUX = 142 '''获取-s系列双输出预览参数(-s系列双输出2006-04-13) 
Const NET_DVR_SET_PREVIEWCFG_AUX = 143 '''设置-s系列双输出预览参数(-s系列双输出2006-04-13) 
 
Const NET_DVR_GET_PICCFG_EX = 200 '''获取图象参数(SDK_V14扩展命令) 
Const NET_DVR_SET_PICCFG_EX = 201 '''设置图象参数(SDK_V14扩展命令) 
Const NET_DVR_GET_USERCFG_EX = 202 '''获取用户参数(SDK_V15扩展命令) 
Const NET_DVR_SET_USERCFG_EX = 203 '''设置用户参数(SDK_V15扩展命令) 
Const NET_DVR_GET_COMPRESSCFG_EX = 204 '''获取压缩参数(SDK_V15扩展命令2006-05-15) 
Const NET_DVR_SET_COMPRESSCFG_EX = 205 '''设置压缩参数(SDK_V15扩展命令2006-05-15) 
 
Const NET_DVR_GET_NETAPPCFG = 222 '''获取网络应用参数 NTP'DDNS'EMAIL 
Const NET_DVR_SET_NETAPPCFG = 223 '''设置网络应用参数 NTP'DDNS'EMAIL 
Const NET_DVR_GET_NTPCFG = 224 '''获取网络应用参数 NTP 
Const NET_DVR_SET_NTPCFG = 225 '''设置网络应用参数 NTP 
Const NET_DVR_GET_DDNSCFG = 226 '''获取网络应用参数 DDNS 
Const NET_DVR_SET_DDNSCFG = 227 '''设置网络应用参数 DDNS 
''对应NET_DVR_EMAILPARA 
Const NET_DVR_GET_EMAILCFG = 228 '''获取网络应用参数 EMAIL 
Const NET_DVR_SET_EMAILCFG = 229 '''设置网络应用参数 EMAIL 
 
Const NET_DVR_GET_NFSCFG = 230 ''* NFS disk config *' 
Const NET_DVR_SET_NFSCFG = 231 ''* NFS disk config *' 
 
Const NET_DVR_GET_SHOWSTRING_EX = 238 '''获取叠加字符参数扩展(支持8条字符) 
Const NET_DVR_SET_SHOWSTRING_EX = 239 '''设置叠加字符参数扩展(支持8条字符) 
Const NET_DVR_GET_NETCFG_OTHER = 244 '''获取网络参数 
Const NET_DVR_SET_NETCFG_OTHER = 245 '''设置网络参数 
 
''对应NET_DVR_EMAILCFG结构 
Const NET_DVR_GET_EMAILPARACFG = 250 '''Get EMAIL parameters 
Const NET_DVR_SET_EMAILPARACFG = 251 '''Setup EMAIL parameters 
 
Const NET_DVR_GET_DDNSCFG_EX = 274 '''获取扩展DDNS参数 
Const NET_DVR_SET_DDNSCFG_EX = 275 '''设置扩展DDNS参数 
 
Const NET_DVR_SET_PTZPOS = 292 '''云台设置PTZ位置 
Const NET_DVR_GET_PTZPOS = 293 '''云台获取PTZ位置 
Const NET_DVR_GET_PTZSCOPE = 294 '''云台获取PTZ范围 
 
Const NET_DVR_GET_AP_INFO_LIST = 305 '''获取无线网络资源参数 
Const NET_DVR_SET_WIFI_CFG = 306 '''设置IP监控设备无线参数 
Const NET_DVR_GET_WIFI_CFG = 307 '''获取IP监控设备无线参数 
Const NET_DVR_SET_WIFI_WORKMODE = 308 '''设置IP监控设备网口工作模式参数 
Const NET_DVR_GET_WIFI_WORKMODE = 309 '''获取IP监控设备网口工作模式参数 
Const NET_DVR_GET_WIFI_STATUS = 310 ' ''获取设备当前wifi连接状态 
'***************************DS9000新增命令(_V30) begin *****************************' 
''网络(NET_DVR_NETCFG_V30结构) 
Const NET_DVR_GET_NETCFG_V30 = 1000 '''获取网络参数 
Const NET_DVR_SET_NETCFG_V30 = 1001 '''设置网络参数 
 
''图象(NET_DVR_PICCFG_V30结构) 
Const NET_DVR_GET_PICCFG_V30 = 1002 '''获取图象参数 
Const NET_DVR_SET_PICCFG_V30 = 1003 '''设置图象参数 
 
''录像时间(NET_DVR_RECORD_V30结构) 
Const NET_DVR_GET_RECORDCFG_V30 = 1004 '''获取录像参数 
Const NET_DVR_SET_RECORDCFG_V30 = 1005 '''设置录像参数 
 
''用户(NET_DVR_USER_V30结构) 
Const NET_DVR_GET_USERCFG_V30 = 1006 '''获取用户参数 
Const NET_DVR_SET_USERCFG_V30 = 1007 '''设置用户参数 
 
''9000DDNS参数配置(NET_DVR_DDNSPARA_V30结构) 
Const NET_DVR_GET_DDNSCFG_V30 = 1010 '''获取DDNS(9000扩展) 
Const NET_DVR_SET_DDNSCFG_V30 = 1011 '''设置DDNS(9000扩展) 
 
''EMAIL功能(NET_DVR_EMAILCFG_V30结构) 
Const NET_DVR_GET_EMAILCFG_V30 = 1012 '''获取EMAIL参数 
Const NET_DVR_SET_EMAILCFG_V30 = 1013 '''设置EMAIL参数 
 
''巡航参数 (NET_DVR_CRUISE_PARA结构) 
Const NET_DVR_GET_CRUISE = 1020 ' 
Const NET_DVR_SET_CRUISE = 1021 ' 
 
''报警输入结构参数 (NET_DVR_ALARMINCFG_V30结构) 
Const NET_DVR_GET_ALARMINCFG_V30 = 1024 ' 
Const NET_DVR_SET_ALARMINCFG_V30 = 1025 ' 
 
''报警输出结构参数 (NET_DVR_ALARMOUTCFG_V30结构) 
Const NET_DVR_GET_ALARMOUTCFG_V30 = 1026 ' 
Const NET_DVR_SET_ALARMOUTCFG_V30 = 1027 ' 
 
''视频输出结构参数 (NET_DVR_VIDEOOUT_V30结构) 
Const NET_DVR_GET_VIDEOOUTCFG_V30 = 1028 ' 
Const NET_DVR_SET_VIDEOOUTCFG_V30 = 1029 ' 
 
''叠加字符结构参数 (NET_DVR_SHOWSTRING_V30结构) 
Const NET_DVR_GET_SHOWSTRING_V30 = 1030 ' 
Const NET_DVR_SET_SHOWSTRING_V30 = 1031 ' 
 
''异常结构参数 (NET_DVR_EXCEPTION_V30结构) 
Const NET_DVR_GET_EXCEPTIONCFG_V30 = 1034 ' 
Const NET_DVR_SET_EXCEPTIONCFG_V30 = 1035 ' 
 
''串口232结构参数 (NET_DVR_RS232CFG_V30结构) 
Const NET_DVR_GET_RS232CFG_V30 = 1036 ' 
Const NET_DVR_SET_RS232CFG_V30 = 1037 ' 
 
''网络硬盘接入结构参数 (NET_DVR_NET_DISKCFG结构) 
Const NET_DVR_GET_NET_DISKCFG = 1038 '''网络硬盘接入获取 
Const NET_DVR_SET_NET_DISKCFG = 1039 '''网络硬盘接入设置 
 
''压缩参数 (NET_DVR_COMPRESSIONCFG_V30结构) 
Const NET_DVR_GET_COMPRESSCFG_V30 = 1040 ' 
Const NET_DVR_SET_COMPRESSCFG_V30 = 1041 ' 
 
''获取485解码器参数 (NET_DVR_DECODERCFG_V30结构) 
Const NET_DVR_GET_DECODERCFG_V30 = 1042 '''获取解码器参数 
Const NET_DVR_SET_DECODERCFG_V30 = 1043 '''设置解码器参数 
 
''获取预览参数 (NET_DVR_PREVIEWCFG_V30结构) 
Const NET_DVR_GET_PREVIEWCFG_V30 = 1044 '''获取预览参数 
Const NET_DVR_SET_PREVIEWCFG_V30 = 1045 '''设置预览参数 
 
''辅助预览参数 (NET_DVR_PREVIEWCFG_AUX_V30结构) 
Const NET_DVR_GET_PREVIEWCFG_AUX_V30 = 1046 '''获取辅助预览参数 
Const NET_DVR_SET_PREVIEWCFG_AUX_V30 = 1047 '''设置辅助预览参数 
 
''IP接入配置参数 (NET_DVR_IPPARACFG结构) 
Const NET_DVR_GET_IPPARACFG = 1048 ' ''获取IP接入配置信息 
Const NET_DVR_SET_IPPARACFG = 1049 '''设置IP接入配置信息 
 
''IP接入配置参数 (NET_DVR_IPPARACFG_V40结构) 
Const NET_DVR_GET_IPPARACFG_V40 = 1062 ' ''获取IP接入配置信息 
Const NET_DVR_SET_IPPARACFG_V40 = 1063 '''设置IP接入配置信息 
 
''IP报警输入接入配置参数 (NET_DVR_IPALARMINCFG结构) 
Const NET_DVR_GET_IPALARMINCFG = 1050 ' ''获取IP报警输入接入配置信息 
Const NET_DVR_SET_IPALARMINCFG = 1051 ' ''设置IP报警输入接入配置信息 
 
''IP报警输出接入配置参数 (NET_DVR_IPALARMOUTCFG结构) 
Const NET_DVR_GET_IPALARMOUTCFG = 1052 '''获取IP报警输出接入配置信息 
Const NET_DVR_SET_IPALARMOUTCFG = 1053 '''设置IP报警输出接入配置信息 
 
''硬盘管理的参数获取 (NET_DVR_HDCFG结构) 
Const NET_DVR_GET_HDCFG = 1054 '''获取硬盘管理配置参数 
Const NET_DVR_SET_HDCFG = 1055 '''设置硬盘管理配置参数 
 
''盘组管理的参数获取 (NET_DVR_HDGROUP_CFG结构) 
Const NET_DVR_GET_HDGROUP_CFG = 1056 '''获取盘组管理配置参数 
Const NET_DVR_SET_HDGROUP_CFG = 1057 '''设置盘组管理配置参数 
 
''设备编码类型配置(NET_DVR_COMPRESSION_AUDIO结构) 
Const NET_DVR_GET_COMPRESSCFG_AUD = 1058 '''获取设备语音对讲编码参数 
Const NET_DVR_SET_COMPRESSCFG_AUD = 1059 '''设置设备语音对讲编码参数 
 
''IP接入配置参数 (NET_DVR_IPPARACFG_V31结构) 
Const NET_DVR_GET_IPPARACFG_V31 = 1060 '''获取IP接入配置信息 
Const NET_DVR_SET_IPPARACFG_V31 = 1061 ' ''设置IP接入配置信息 
 
''设备参数配置 (NET_DVR_DEVICECFG_V40结构) 
Const NET_DVR_GET_DEVICECFG_V40 = 1100 '''获取设备参数 
Const NET_DVR_SET_DEVICECFG_V40 = 1101 '''设置设备参数 
 
''多网卡配置(NET_DVR_NETCFG_MULTI结构) 
Const NET_DVR_GET_NETCFG_MULTI = 1161 ' 
Const NET_DVR_SET_NETCFG_MULTI = 1162 ' 
 
''BONDING网卡(NET_DVR_NETWORK_BONDING结构) 
Const NET_DVR_GET_NETWORK_BONDING = 1254 ' 
Const NET_DVR_SET_NETWORK_BONDING = 1255 ' 
 
''NAT映射配置参数 (NET_DVR_NAT_CFG结构) 
Const NET_DVR_GET_NAT_CFG = 6111 '    ''获取NAT映射参数 
Const NET_DVR_SET_NAT_CFG = 6112 '    ''设置NAT映射参数 
'*************************参数配置命令 end*******************************' 
 
'************************DVR日志 begin***************************' 
'* 报警 *' 
''主类型 
Const MAJOR_ALARM = 1 ' 
''次类型 
Const MINOR_ALARM_IN = 1 ''* 报警输入 *' 
Const MINOR_ALARM_OUT = 2 ''* 报警输出 *' 
Const MINOR_MOTDET_START = 3 ' '* 移动侦测报警开始 *' 
Const MINOR_MOTDET_STOP = 4 ' '* 移动侦测报警结束 *' 
Const MINOR_HIDE_ALARM_START = 5 ''* 遮挡报警开始 *' 
Const MINOR_HIDE_ALARM_STOP = 6 ''* 遮挡报警结束 *' 
Const MINOR_VCA_ALARM_START = 7 ''*智能报警开始*' 
Const MINOR_VCA_ALARM_STOP = 8 ''*智能报警停止*' 
 
'* 异常 *' 
''主类型 
Const MAJOR_EXCEPTION = 2 ' 
''次类型 
Const MINOR_VI_LOST = 33 ''* 视频信号丢失 *' 
Const MINOR_ILLEGAL_ACCESS = 34 ''* 非法访问 *' 
Const MINOR_HD_FULL = 35 ''* 硬盘满 *' 
Const MINOR_HD_ERROR = 36 ''* 硬盘错误 *' 
Const MINOR_DCD_LOST = 37 ''* MODEM 掉线(保留不使用) *' 
Const MINOR_IP_CONFLICT = 38 ''* IP地址冲突 *' 
Const MINOR_NET_BROKEN = 39 ''* 网络断开*' 
Const MINOR_REC_ERROR = 40 ''* 录像出错 *' 
Const MINOR_IPC_NO_LINK = 41 ''* IPC连接异常 *' 
Const MINOR_VI_EXCEPTION = 42 ''* 视频输入异常(只针对模拟通道) *' 
Const MINOR_IPC_IP_CONFLICT = 43 ''*ipc ip 地址 冲突*' 
 
''视频综合平台 
Const MINOR_FANABNORMAL = 49 ''* 视频综合平台:风扇状态异常 *' 
Const MINOR_FANRESUME = 50 ''* 视频综合平台:风扇状态恢复正常 *' 
Const MINOR_SUBSYSTEM_ABNORMALREBOOT = 51 ''* 视频综合平台:6467异常重启 *' 
Const MINOR_MATRIX_STARTBUZZER = 52 ''* 视频综合平台:dm6467异常,启动蜂鸣器 *' 
 
'* 操作 *' 
''主类型 
Const MAJOR_OPERATION = 3 ' 
''次类型 
Const MINOR_START_DVR = 65 ''* 开机 *' 
Const MINOR_STOP_DVR = 66 ''* 关机 *' 
Const MINOR_STOP_ABNORMAL = 67 ''* 异常关机 *' 
Const MINOR_REBOOT_DVR = 68 ''*本地重启设备*' 
 
Const MINOR_LOCAL_LOGIN = 80 ''* 本地登陆 *' 
Const MINOR_LOCAL_LOGOUT = 81 ''* 本地注销登陆 *' 
Const MINOR_LOCAL_CFG_PARM = 82 ''* 本地配置参数 *' 
Const MINOR_LOCAL_PLAYBYFILE = 83 ''* 本地按文件回放或下载 *' 
Const MINOR_LOCAL_PLAYBYTIME = 84 ''* 本地按时间回放或下载*' 
Const MINOR_LOCAL_START_REC = 85 ''* 本地开始录像 *' 
Const MINOR_LOCAL_STOP_REC = 86 ''* 本地停止录像 *' 
Const MINOR_LOCAL_PTZCTRL = 87 ''* 本地云台控制 *' 
Const MINOR_LOCAL_PREVIEW = 88 ''* 本地预览 (保留不使用)*' 
Const MINOR_LOCAL_MODIFY_TIME = 89 ''* 本地修改时间(保留不使用) *' 
Const MINOR_LOCAL_UPGRADE = 90 ''* 本地升级 *' 
Const MINOR_LOCAL_RECFILE_OUTPUT = 91 ''* 本地备份录象文件 *' 
Const MINOR_LOCAL_FORMAT_HDD = 92 ''* 本地初始化硬盘 *' 
Const MINOR_LOCAL_CFGFILE_OUTPUT = 93 ''* 导出本地配置文件 *' 
Const MINOR_LOCAL_CFGFILE_INPUT = 94 ''* 导入本地配置文件 *' 
Const MINOR_LOCAL_COPYFILE = 95 ''* 本地备份文件 *' 
Const MINOR_LOCAL_LOCKFILE = 96 ''* 本地锁定录像文件 *' 
Const MINOR_LOCAL_UNLOCKFILE = 97 ''* 本地解锁录像文件 *' 
Const MINOR_LOCAL_DVR_ALARM = 98 ''* 本地手动清除和触发报警*' 
Const MINOR_IPC_ADD = 99 ''* 本地添加IPC *' 
Const MINOR_IPC_DEL = 100 ''* 本地删除IPC *' 
Const MINOR_IPC_SET = 101 ''* 本地设置IPC *' 
Const MINOR_LOCAL_START_BACKUP = 102 ''* 本地开始备份 *' 
Const MINOR_LOCAL_STOP_BACKUP = 103 ''* 本地停止备份*' 
Const MINOR_LOCAL_COPYFILE_START_TIME = 104 ''* 本地备份开始时间*' 
Const MINOR_LOCAL_COPYFILE_END_TIME = 105 ''* 本地备份结束时间*' 
Const MINOR_LOCAL_ADD_NAS = 106 ''*本地添加网络硬盘*' 
Const MINOR_LOCAL_DEL_NAS = 107 ''* 本地删除nas盘*' 
Const MINOR_LOCAL_SET_NAS = 108 ''* 本地设置nas盘*' 
 
Const MINOR_REMOTE_LOGIN = 112 ''* 远程登录 *' 
Const MINOR_REMOTE_LOGOUT = 113 ''* 远程注销登陆 *' 
Const MINOR_REMOTE_START_REC = 114 ''* 远程开始录像 *' 
Const MINOR_REMOTE_STOP_REC = 115 ''* 远程停止录像 *' 
Const MINOR_START_TRANS_CHAN = 116 ''* 开始透明传输 *' 
Const MINOR_STOP_TRANS_CHAN = 117 ''* 停止透明传输 *' 
Const MINOR_REMOTE_GET_PARM = 118 ''* 远程获取参数 *' 
Const MINOR_REMOTE_CFG_PARM = 119 ''* 远程配置参数 *' 
Const MINOR_REMOTE_GET_STATUS = 120 ''* 远程获取状态 *' 
Const MINOR_REMOTE_ARM = 121 ''* 远程布防 *' 
Const MINOR_REMOTE_DISARM = 122 ''* 远程撤防 *' 
Const MINOR_REMOTE_REBOOT = 123 ''* 远程重启 *' 
Const MINOR_START_VT = 124 ''* 开始语音对讲 *' 
Const MINOR_STOP_VT = 125 ''* 停止语音对讲 *' 
Const MINOR_REMOTE_UPGRADE = 126 ''* 远程升级 *' 
Const MINOR_REMOTE_PLAYBYFILE = 127 ''* 远程按文件回放 *' 
Const MINOR_REMOTE_PLAYBYTIME = 128 ''* 远程按时间回放 *' 
Const MINOR_REMOTE_PTZCTRL = 129 ''* 远程云台控制 *' 
Const MINOR_REMOTE_FORMAT_HDD = 130 ''* 远程格式化硬盘 *' 
Const MINOR_REMOTE_STOP = 131 ''* 远程关机 *' 
Const MINOR_REMOTE_LOCKFILE = 132 ''* 远程锁定文件 *' 
Const MINOR_REMOTE_UNLOCKFILE = 133 ''* 远程解锁文件 *' 
Const MINOR_REMOTE_CFGFILE_OUTPUT = 134 ''* 远程导出配置文件 *' 
Const MINOR_REMOTE_CFGFILE_INTPUT = 135 ''* 远程导入配置文件 *' 
Const MINOR_REMOTE_RECFILE_OUTPUT = 136 ''* 远程导出录象文件 *' 
Const MINOR_REMOTE_DVR_ALARM = 137 ''* 远程手动清除和触发报警*' 
Const MINOR_REMOTE_IPC_ADD = 138 ''* 远程添加IPC *' 
Const MINOR_REMOTE_IPC_DEL = 139 ''* 远程删除IPC *' 
Const MINOR_REMOTE_IPC_SET = 140 ''* 远程设置IPC *' 
Const MINOR_REBOOT_VCA_LIB = 141 ''*重启智能库*' 
Const MINOR_REMOTE_ADD_NAS = 142 ''* 远程添加nas盘*' 
Const MINOR_REMOTE_DEL_NAS = 143 ''* 远程删除nas盘*' 
Const MINOR_REMOTE_SET_NAS = 144 ''* 远程设置nas盘*' 
 
''2009-12-16 增加视频综合平台日志类型 
Const MINOR_SUBSYSTEMREBOOT = 160 ''*视频综合平台:dm6467 正常重启*' 
Const MINOR_MATRIX_STARTTRANSFERVIDEO = 161 ' '*视频综合平台:矩阵切换开始传输图像*' 
Const MINOR_MATRIX_STOPTRANSFERVIDEO = 162 '  '*视频综合平台:矩阵切换停止传输图像*' 
Const MINOR_REMOTE_SET_ALLSUBSYSTEM = 163 '   '*视频综合平台:设置所有6467子系统信息*' 
Const MINOR_REMOTE_GET_ALLSUBSYSTEM = 164 '   '*视频综合平台:获取所有6467子系统信息*' 
Const MINOR_REMOTE_SET_PLANARRAY = 165 '  '*视频综合平台:设置计划轮询组*' 
Const MINOR_REMOTE_GET_PLANARRAY = 166 '  '*视频综合平台:获取计划轮询组*' 
Const MINOR_MATRIX_STARTTRANSFERAUDIO = 167 ' '*视频综合平台:矩阵切换开始传输音频*' 
Const MINOR_MATRIX_STOPRANSFERAUDIO = 168 '   '*视频综合平台:矩阵切换停止传输音频*' 
Const MINOR_LOGON_CODESPITTER = 169 ' '*视频综合平台:登陆码分器*' 
Const MINOR_LOGOFF_CODESPITTER = 170 '    '*视频综合平台:退出码分器*' 
 
'*日志附加信息*' 
''主类型 
Const MAJOR_INFORMATION = 4 ''*附加信息*' 
''次类型 
Const MINOR_HDD_INFO = 161 ''*硬盘信息*' 
Const MINOR_SMART_INFO = 162 ''*SMART信息*' 
Const MINOR_REC_START = 163 ''*开始录像*' 
Const MINOR_REC_STOP = 164 ''*停止录像*' 
Const MINOR_REC_OVERDUE = 165 ''*过期录像删除*' 
Const MINOR_LINK_START = 166 '''连接前端设备 
Const MINOR_LINK_STOP = 167 '''断开前端设备 
Const MINOR_NET_DISK_INFO = 168 '''网络硬盘信息 
 
''当日志的主类型为MAJOR_OPERATION=03,次类型为MINOR_LOCAL_CFG_PARM=&H52或者MINOR_REMOTE_GET_PARM=&H76或者MINOR_REMOTE_CFG_PARM=&H77时,dwParaType:参数类型有效,其含义如下: 
Const PARA_VIDEOOUT = 1 ' 
Const PARA_IMAGE = 2 ' 
Const PARA_ENCODE = 4 ' 
Const PARA_NETWORK = 8 ' 
Const PARA_ALARM = 16 ' 
Const PARA_EXCEPTION = 32 ' 
Const PARA_DECODER = 64 ''*解码器*' 
Const PARA_RS232 = 128 ' 
Const PARA_PREVIEW = 256 ' 
Const PARA_SECURITY = 512 ' 
Const PARA_DATETIME = 1024 ' 
Const PARA_FRAMETYPE = 2048 ''*帧格式*' 
''vca 
Const PARA_VCA_RULE = 4096 '''行为规则 
'************************DVR日志 End***************************' 
 
 
'*******************查找文件和日志函数返回值*************************' 
Const NET_DVR_FILE_SUCCESS = 1000 '''获得文件信息 
Const NET_DVR_FILE_NOFIND = 1001 '''没有文件 
Const NET_DVR_ISFINDING = 1002 '''正在查找文件 
Const NET_DVR_NOMOREFILE = 1003 '''查找文件时没有更多的文件 
Const NET_DVR_FILE_EXCEPTION = 1004 '''查找文件时异常 
 
'*********************回调函数类型 begin************************' 
Const COMM_ALARM = &H1100 '''8000报警信息主动上传,对应NET_DVR_ALARMINFO 
Const COMM_ALARM_RULE = &H1102 '''行为分析报警信息,对应NET_VCA_RULE_ALARM 
Const COMM_ALARM_PDC = &H1103 '''人流量统计报警上传,对应NET_DVR_PDC_ALRAM_INFO 
Const COMM_ALARM_ALARMHOST = &H1105 '''网络报警主机报警上传,对应NET_DVR_ALARMHOST_ALARMINFO 
Const COMM_ALARM_FACE = &H1106 '''人脸检测识别报警信息,对应NET_DVR_FACEDETECT_ALARM 
Const COMM_RULE_INFO_UPLOAD = &H1107 '  '' 事件数据信息上传 
Const COMM_ALARM_AID = &H1110 '  ''交通事件报警信息 
Const COMM_ALARM_TPS = &H1111 '  ''交通参数统计报警信息 
Const COMM_UPLOAD_FACESNAP_RESULT = &H1112 '  ''人脸识别结果上传 
Const COMM_ALARM_TFS = &H1113 '  ''交通取证报警信息 
Const COMM_ALARM_TPS_V41 = &H1114 '  ''交通参数统计报警信息扩展 
Const COMM_ALARM_AID_V41 = &H1115 '  ''交通事件报警信息扩展 
Const COMM_ALARM_VQD_EX = &H1116 '    ''视频质量诊断报警 
Const COMM_SENSOR_VALUE_UPLOAD = &H1120 '  ''模拟量数据实时上传 
Const COMM_SENSOR_ALARM = &H1121 '  ''模拟量报警上传 
Const COMM_SWITCH_ALARM = &H1122  '   ''开关量报警 
Const COMM_ALARMHOST_EXCEPTION = &H1123   ' ''报警主机故障报警 
Const COMM_ALARMHOST_OPERATEEVENT_ALARM = &H1124 '  ''操作事件报警上传 
Const COMM_ALARMHOST_SAFETYCABINSTATE = &H1125 '   ''防护舱状态 
Const COMM_ALARMHOST_ALARMOUTSTATUS = &H1126 '    ''报警输出口'警号状态 
Const COMM_ALARMHOST_CID_ALARM = &H1127   '   ''报告报警上传 
Const COMM_ALARMHOST_EXTERNAL_DEVICE_ALARM = &H1128 '  ''报警主机外接设备报警上传 
Const COMM_ALARMHOST_DATA_UPLOAD = &H1129   '     ''报警数据上传 
Const COMM_ALARM_AUDIOEXCEPTION = &H1150   '  ''声音报警信息 
Const COMM_ALARM_DEFOCUS = &H1151        '    ''虚焦报警信息 
Const COMM_ALARM_BUTTON_DOWN_EXCEPTION = &H1152 '     ''按钮按下报警信息 
Const COMM_ALARM_ALARMGPS = &H1202     ' ''GPS报警信息上传 
Const COMM_TRADEINFO = &H1500      '  ''ATMDVR主动上传交易信息 
Const COMM_UPLOAD_PLATE_RESULT = &H2800   '   ''上传车牌信息 
Const COMM_ITC_STATUS_DETECT_RESULT = &H2810 '  ''实时状态检测结果上传(智能高清IPC) 
Const COMM_IPC_AUXALARM_RESULT = &H2820 '  ''PIR报警、无线报警、呼救报警上传 
Const COMM_UPLOAD_PICTUREINFO = &H2900   '    ''上传图片信息 
Const COMM_SNAP_MATCH_ALARM = &H2902  '  ''黑名单比对结果上传 
Const COMM_ITS_PLATE_RESULT = &H3050   '  ''终端图片上传 
Const COMM_ITS_TRAFFIC_COLLECT = &H3051 '  ''终端统计数据上传 
Const COMM_ITS_GATE_VEHICLE = &H3052 '  ''出入口车辆抓拍数据上传 
Const COMM_ITS_GATE_FACE = &H3053  ' ''出入口人脸抓拍数据上传 
Const COMM_ITS_GATE_COSTITEM = &H3054 '  ''出入口过车收费明细 2013-11-19 
Const COMM_ITS_GATE_HANDOVER = &H3055 ' ''出入口交接班数据 2013-11-19 
Const COMM_ITS_PARK_VEHICLE = &H3056 '  ''停车场数据上传 
Const COMM_ITS_BLACKLIST_ALARM = &H3057 '  ''黑名单报警上传 
Const COMM_ALARM_V30 = &H4000  '  ''9000报警信息主动上传 
Const COMM_IPCCFG = &H4001     '  ''9000设备IPC接入配置改变报警信息主动上传 
Const COMM_IPCCFG_V31 = &H4002 '   ''9000设备IPC接入配置改变报警信息主动上传扩展 9000_1.1 
Const COMM_IPCCFG_V40 = &H4003 ' '' IVMS 2000 编码服务器 NVR IPC接入配置改变时报警信息上传 
Const COMM_ALARM_DEVICE = &H4004 '  ''设备报警内容,由于通道值大于256而扩展 
Const COMM_ALARM_CVR = &H4005  '  ''CVR 2.0.X外部报警类型 
Const COMM_ALARM_HOT_SPARE = &H4006 '  ''热备异常报警(N+1模式异常报警) 
Const COMM_ALARM_V40 = &H4007 '   ''移动侦测,视频丢失,遮挡,IO信号量等报警信息主动上传,报警数据为可变长 
 
Const COMM_ITS_ROAD_EXCEPTION = &H4500 '   ''路口设备异常报警 
Const COMM_ITS_EXTERNAL_CONTROL_ALARM = &H4520 '  ''外控报警 
Const COMM_SCREEN_ALARM = &H5000    '  ''多屏控制器报警类型 
Const COMM_DVCS_STATE_ALARM = &H5001 '  ''分布式大屏控制器报警上传 
Const COMM_ALARM_VQD = &H6000     '  ''VQD主动报警上传 
Const COMM_PUSH_UPDATE_RECORD_INFO = &H6001 '  ''推模式录像信息上传 
Const COMM_DIAGNOSIS_UPLOAD = &H5100 '  ''诊断服务器VQD报警上传 
 
'*************操作异常类型(消息方式, 回调方式(保留))****************' 
Const EXCEPTION_EXCHANGE = 32768 '''用户交互时异常 
Const EXCEPTION_AUDIOEXCHANGE = 32769 '''语音对讲异常 
Const EXCEPTION_ALARM = 32770 '''报警异常 
Const EXCEPTION_PREVIEW = 32771 '''网络预览异常 
Const EXCEPTION_SERIAL = 32772 '''透明通道异常 
Const EXCEPTION_RECONNECT = 32773 '''预览时重连 
Const EXCEPTION_ALARMRECONNECT = 32774 '''报警时重连 
Const EXCEPTION_SERIALRECONNECT = 32775 '''透明通道重连 
Const EXCEPTION_PLAYBACK = 32784 '''回放异常 
Const EXCEPTION_DISKFMT = 32785 '''硬盘格式化 
 
'********************预览回调函数*********************' 
Const NET_DVR_SYSHEAD = 1 '''系统头数据 
Const NET_DVR_STREAMDATA = 2 '''视频流数据(包括复合流和音视频分开的视频流数据) 
Const NET_DVR_AUDIOSTREAMDATA = 3 '''音频流数据 
Const NET_DVR_STD_VIDEODATA = 4 '''标准视频流数据 
Const NET_DVR_STD_AUDIODATA = 5 '''标准音频流数据 
 
''回调预览中的状态和消息 
Const NET_DVR_REALPLAYEXCEPTION = 111 '''预览异常 
Const NET_DVR_REALPLAYNETCLOSE = 112 '''预览时连接断开 
Const NET_DVR_REALPLAY5SNODATA = 113 '''预览5s没有收到数据 
Const NET_DVR_REALPLAYRECONNECT = 114 '''预览重连 
 
'********************回放回调函数*********************' 
Const NET_DVR_PLAYBACKOVER = 101 '''回放数据播放完毕 
Const NET_DVR_PLAYBACKEXCEPTION = 102 '''回放异常 
Const NET_DVR_PLAYBACKNETCLOSE = 103 '''回放时候连接断开 
Const NET_DVR_PLAYBACK5SNODATA = 104 '''回放5s没有收到数据 
 
'*********************回调函数类型 end************************' 
''设备型号(DVR类型) 
'* 设备类型 *' 
Const DVR = 1 ''*对尚未定义的dvr类型返回NETRET_DVR*' 
Const ATMDVR = 2 ''*atm dvr*' 
Const DVS = 3 ''*DVS*' 
Const DEC = 4 ''* 6001D *' 
Const ENC_DEC = 5 ''* 6001F *' 
Const DVR_HC = 6 ''*8000HC*' 
Const DVR_HT = 7 ''*8000HT*' 
Const DVR_HF = 8 ''*8000HF*' 
Const DVR_HS = 9 ''* 8000HS DVR(no audio) *' 
Const DVR_HTS = 10 ' '* 8016HTS DVR(no audio) *' 
Const DVR_HB = 11 ' '* HB DVR(SATA HD) *' 
Const DVR_HCS = 12 ' '* 8000HCS DVR *' 
Const DVS_A = 13 ' '* 带ATA硬盘的DVS *' 
Const DVR_HC_S = 14 ' '* 8000HC-S *' 
Const DVR_HT_S = 15 ''* 8000HT-S *' 
Const DVR_HF_S = 16 ''* 8000HF-S *' 
Const DVR_HS_S = 17 ' '* 8000HS-S *' 
Const ATMDVR_S = 18 ''* ATM-S *' 
Const LOWCOST_DVR = 19 ''*7000H系列*' 
Const DEC_MAT = 20 ' '*多路解码器*' 
Const DVR_MOBILE = 21 ''* mobile DVR *' 
Const DVR_HD_S = 22 '   '* 8000HD-S *' 
Const DVR_HD_SL = 23 ''* 8000HD-SL *' 
Const DVR_HC_SL = 24 ''* 8000HC-SL *' 
Const DVR_HS_ST = 25 ''* 8000HS_ST *' 
Const DVS_HW = 26 ' '* 6000HW *' 
Const DS630X_D = 27 ' '* 多路解码器 *' 
Const IPCAM = 30 ''*IP 摄像机*' 
Const MEGA_IPCAM = 31 ''*X52MF系列,752MF,852MF*' 
Const IPCAM_X62MF = 32 ''*X62MF系列可接入9000设备,762MF,862MF*' 
Const IPDOME = 40 ' '*IP 标清球机*' 
Const IPDOME_MEGA200 = 41 ''*IP 200万高清球机*' 
Const IPDOME_MEGA130 = 42 ''*IP 130万高清球机*' 
Const IPMOD = 50 ''*IP 模块*' 
Const DS71XX_H = 71 ''* DS71XXH_S *' 
Const DS72XX_H_S = 72 ''* DS72XXH_S *' 
Const DS73XX_H_S = 73 ''* DS73XXH_S *' 
Const DS76XX_H_S = 76 ''* DS76XX_H_S *' 
Const DS81XX_HS_S = 81 ''* DS81XX_HS_S *' 
Const DS81XX_HL_S = 82 ''* DS81XX_HL_S *' 
Const DS81XX_HC_S = 83 ''* DS81XX_HC_S *' 
Const DS81XX_HD_S = 84 ''* DS81XX_HD_S *' 
Const DS81XX_HE_S = 85 ''* DS81XX_HE_S *' 
Const DS81XX_HF_S = 86 ''* DS81XX_HF_S *' 
Const DS81XX_AH_S = 87 ''* DS81XX_AH_S *' 
Const DS81XX_AHF_S = 88 ''* DS81XX_AHF_S *' 
Const DS90xX_HF_S = 90 '  '*DS9&HX_HF_S*' 
Const DS91XX_HF_S = 91 '  '*DS91XX_HF_S*' 
Const DS91XX_HD_S = 92 ' '*91XXHD-S(MD)*' 
''**********************设备类型 end***********************' 
 
 
 
 
'Const MAX_STRINGNUM = 4 
 
 
Const NET_DVR_GET_CCDPARAMCFG = 1067        'IPC获取CCD参数配置 
Const NET_DVR_SET_CCDPARAMCFG = 1068       'IPC设置CCD参数配置 
 
Const NET_DVR_GET_IOINCFG = 1070            '获取抓拍机IO输入参数 
Const NET_DVR_SET_IOINCFG = 1071      '设置抓拍机IO输入参数 
 
Const NET_DVR_GET_IOOUTCFG = 1072     '获取抓拍机IO输出参数 
Const NET_DVR_SET_IOOUTCFG = 1073      '设置抓拍机IO输出参数 
 
Const NET_DVR_GET_FLASHCFG = 1074     '获取IO闪光灯输出参数 
Const NET_DVR_SET_FLASHCFG = 1075     '设置IO闪光灯输出参数 
 
Const NET_DVR_GET_LIGHTSNAPCFG = 1076   '获取抓拍机红绿灯参数 
Const NET_DVR_SET_LIGHTSNAPCFG = 1077     '设置抓拍机红绿灯参数 
 
Const NET_DVR_GET_MEASURESPEEDCFG = 1078   '获取抓拍机测速参数 
Const NET_DVR_SET_MEASURESPEEDCFG = 1079     '设置抓拍机测速参数 
 
Const NET_DVR_GET_IMAGEOVERLAYCFG = 1080 '获取抓拍机图像叠加信息参数 
Const NET_DVR_SET_IMAGEOVERLAYCFG = 1081 '设置抓拍机图像叠加信息参数 
 
Const NET_DVR_GET_SNAPCFG = 1082 '获取单IO触发抓拍功能配置 
Const NET_DVR_SET_SNAPCFG = 1083 '设置单IO触发抓拍功能配置 
 
Const NET_DVR_GET_VTPPARAM = 1084 '获取虚拟线圈参数 
Const NET_DVR_SET_VTPPARAM = 1085 '设置虚拟线圈参数 
 
Const NET_DVR_GET_SNAPENABLECFG = 1086 '获取抓拍机使能参数 
Const NET_DVR_SET_SNAPENABLECFG = 1087 '设置抓拍机使能参数 
 
Const NET_DVR_GET_SNMPCFG = 1110    '获取SNMP参数 
Const NET_DVR_SET_SNMPCFG = 1111    '设置SNMP参数 
 
Const NET_DVR_GET_FTPCFG = 134     '获取抓图的FTP参数(基线) 
Const NET_DVR_SET_FTPCFG = 135     '设置抓图的FTP参数(基线) 
Const NET_DVR_GET_JPEGCFG_V30 = 1090       '获取抓图的JPEG参数(基线) 
Const NET_DVR_SET_JPEGCFG_V30 = 1091       '设置抓图的JPEG参数(基线) 
 
 
 
'//IO输入配置 
Type NET_DVR_IO_INCFG 
 
    dwSize As Long 
    byIoInStatus As Byte '//输入的IO口状态,0-下降沿,1-上升沿,2-上升沿和下降沿,3-高电平,4-低电平 
    byRes(3) As Byte '//保留字节 
End Type 
 
'//IO输出配置 
Type NET_DVR_IO_OUTCFG 
    dwSize As Long 
    byDefaultStatus As Byte '//IO默认状态:0-低电平,1-高电平 
    byIoOutStatus As Byte '//IO起效时状态:0-低电平,1-高电平,2-脉冲 
    byRes1(2) As Byte 
    dwTimePluse As Long '//脉冲间隔时间,单位us 
    dwTimeDelay As Long '//IO有效持续时间,单位us 
    byRes2(2) As Byte 
End Type 
 
'//闪光灯配置 
Type NET_DVR_FLASH_OUTCFG 
    dwSize As Long 
    byMode As Byte '//闪光灯闪烁模式,0-不闪,1-闪,2-关联闪,3-轮闪 
    byRelatedIoIn As Byte '//闪光灯关联的输入IO号(关联闪时此参数有效) 
    byRes(10) As Byte 
End Type 
 
'//红绿灯功能(2个IO输入一组) 
Type NET_DVR_LIGHTSNAPCFG 
    dwSize As Long 
    byLightIoIn As Byte '//红绿灯的IO 号 
    byTrigIoIn As Byte '//触发的IO号 
    byRelatedDriveWay As Byte '//触发IO关联的车道号 
    byTrafficLight As Byte '//0-高电平红灯,低电平绿灯 As Byte1-高电平绿灯,低电平红灯 
    bySnapTimes1 As Byte '//红灯抓拍次数1,0-不抓拍,非0-连拍次数,最大5次 
    bySnapTimes2 As Byte '//绿灯抓拍次数2,0-不抓拍,非0-连拍次数,最大5次 
    byRes1(2) As Byte 
    wIntervalTime1(4) As Integer  '//红灯连拍间隔时间,ms 
    wIntervalTime2(4) As Integer '//绿灯连拍间隔时间,ms 
    byRecord As Byte '//闯红灯周期录像标志,0-不录像,1-录像 
    bySessionTimeout As Byte '//闯红灯周期录像超时时间(秒) 
    byPreRecordTime As Byte '//闯红灯录像片段预录时间(秒) 
    byVideoDelay As Byte '//闯红灯录像片段延时时间(秒) 
    byRes2(32) As Byte '//保留字节 
End Type 
 
'//测速功能(2个IO输入一组) 
Type NET_DVR_MEASURESPEEDCFG 
    dwSize As Long 
    byTrigIo1 As Byte   '//测速第1线圈 
    byTrigIo2 As Byte   '//测速第2线圈 
    byRelatedDriveWay As Byte '//触发IO关联的车道号 
    byTestSpeedTimeOut As Byte '//测速模式超时时间,单位s 
    dwDistance As Long '//线圈距离,cm 
    byCapSpeed As Byte '//测速模式起拍速度,单位km/h 
    bySpeedLimit As Byte '//限速值,单位km/h 
    bySnapTimes1 As Byte '//线圈1抓拍次数,0-不抓拍,非0-连拍次数,最大5次 
    bySnapTimes2 As Byte '//线圈2抓拍次数,0-不抓拍,非0-连拍次数,最大5次 
    wIntervalTime1(4) As Integer '//线圈1连拍间隔时间,ms 
    wIntervalTime2(4) As Integer '//线圈2连拍间隔时间,ms 
    byRes(32) As Byte '//保留字节 
End Type 
 
'//视频参数配置 
Type NET_DVR_VIDEOEFFECT 
     byBrightnessLevel As Byte '/*0-100*/ 
     byContrastLevel As Byte '/*0-100*/ 
     bySharpnessLevel As Byte '/*0-100*/ 
     bySaturationLevel As Byte '/*0-100*/ 
     byHueLevel As Byte '/*0-100,(保留)*/ 
     byRes(3) As Byte 
End Type 
 
'//增益配置 
Type NET_DVR_GAIN 
     byGainLevel As Byte '/*增益:0-100*/ 
     byGainUserSet As Byte '/*用户自定义增益 As Byte0-100*/ 
     byRes(2) As Byte 
     byMaxGainValue As Byte '/*最大增益值,单位dB*/ 
End Type 
 
'//白平衡配置 
Type NET_DVR_WHITEBALANCE 
     byWhiteBalanceMode As Byte '/*0手动白平衡 As Byte 1自动白平衡1(范围小) As Byte 2 自动白平衡2(范围宽,2200K-15000K) As Byte3自动控制3*/ 
     byWhiteBalanceModeRGain As Byte '/*手动白平衡时有效,手动白平衡 R增益*/ 
     byWhiteBalanceModeBGain As Byte '/*手动白平衡时有效,手动白平衡 B增益*/ 
     byRes(5) As Byte 
End Type 
 
'//曝光控制 
Type NET_DVR_EXPOSURE 
     byExposureMode As Byte '/*0 手动曝光 1自动曝光*/ 
     byRes(3) As Byte 
     dwVideoExposureSet As Long '/* 自定义视频曝光时间(单位us)*'/'/*注:自动曝光时该值为曝光最慢值*/ 
     dwExposureUserSet  As Long '/* 自定义抓拍曝光时间(单位us)*/ 
     dwRes As Long 
End Type 
 
'//宽动态配置 
Type NET_DVR_WDR 
     byWDREnabled As Byte '/*宽动态:0 dsibale  1 enable*/ 
     byWDRLevel1 As Byte '/*0-F*/ 
     byWDRLevel2 As Byte '/*0-F*/ 
     byWDRContrastLevel As Byte '/*0-100*/ 
     byRes(16) As Byte 
End Type 
 
'//日夜转换功能配置 
Type NET_DVR_DAYNIGHT 
     byDayNightFilterType As Byte '/*日夜切换:0 day,1 night,2 auto */ 
     bySwitchScheduleEnabled As Byte '/*0 dsibale  1 enable,(保留)*/ 
    '//模式1(保留) 
     byBeginTime As Byte '/*0-100*/ 
     byEndTime As Byte '/*0-100*/ 
    '//模式2 
     byDayToNightFilterLevel As Byte '//0-7 
     byNightToDayFilterLevel As Byte '//0-7 
     byDayNightFilterTime As Byte '//(60秒) 
     byRes(5) As Byte 
End Type 
 
'//Gamma校正 
Type NET_DVR_GAMMACORRECT 
     byGammaCorrectionEnabled As Byte '/*0 dsibale  1 enable*/ 
     byGammaCorrectionLevel As Byte '/*0-100*/ 
     byRes(6) As Byte 
End Type 
 
'//背光补偿配置 
Type NET_DVR_BACKLIGHT 
     byBacklightMode As Byte '/*背光补偿:0 USERSET 1 UP、2 DOWN、3 LEFT、4 RIGHT、5MIDDLE*/ 
     byBacklightLevel As Byte '/*0x0-0xF*/ 
     byRes1(2) As Byte 
     dwPositionX1 As Long '//(X坐标1) 
     dwPositionY1 As Long '//(Y坐标1) 
     dwPositionX2 As Long '//(X坐标2) 
     dwPositionY2 As Long '//(Y坐标2) 
     byRes2(4) As Byte 
End Type 
 
'//数字降噪功能 
Type NET_DVR_NOISEREMOVE 
     byDigitalNoiseRemoveEnable As Byte '/*数字去噪:0 dsibale  1 enable*/ 
     byDigitalNoiseRemoveLevel As Byte '/*0x0-0xF*/ 
     byRes(6) As Byte 
End Type 
 
'//IPC CCD参数配置 
Type NET_DVR_CAMERAPARAMCFG 
    dwSize As Long 
    struVideoEffect As NET_DVR_VIDEOEFFECT '/*亮度、对比度、饱和度、锐度、色调配置*/ 
    struGain As NET_DVR_GAIN '/*自动增益*/ 
    struWhiteBalance As NET_DVR_WHITEBALANCE '/*白平衡*/ 
    struExposure As NET_DVR_EXPOSURE '/*曝光控制*/ 
    struGammaCorrect As NET_DVR_GAMMACORRECT '/*Gamma校正*/ 
    struWdr As NET_DVR_WDR '/*宽动态*/ 
    struDayNight As NET_DVR_DAYNIGHT '/*日夜转换*/ 
    struBackLight As NET_DVR_BACKLIGHT '/*背光补偿*/ 
    struNoiseRemove As NET_DVR_NOISEREMOVE '/*数字降噪*/ 
    byPowerLineFrequencyMode As Byte '/*0-50HZ As Byte 1-60HZ*/ 
    byIrisMode As Byte '/*0 自动光圈 1手动光圈*/ 
    byMirror  As Byte  '/* 镜像:0 Left As Byte1 Right, As Byte2 Up As Byte3Down */ 
    byDigitalZoom As Byte  '/*数字缩放:0 dsibale  1 enable*/ 
    byDeadPixelDetect As Byte   '/*坏点检测,0 dsibale  1 enable*/ 
    byRes(31) As Byte 
End Type 
 
Const MAX_LICENSE_LEN = 16                     '//车牌号最大长度 
 
'//区域框结构 
Type NET_VCA_RECT 
     fX As Single               '//边界框左上角点的X轴坐标, 0.001~1 
     fY As Single '               //边界框左上角点的Y轴坐标, 0.001~1 
     fWidth As Single '           //边界框的宽度, 0.001~1 
     fHeight As Single '          //边界框的高度, 0.001~1 
End Type 
 
'//车牌识别结果子结构 
Type NET_DVR_PLATE_INFO 
      byPlateType As Byte                  '//车牌类型 
      byColor As Byte                      '//车牌颜色 
      byBright As Byte                     '//车牌亮度 
      byLicenseLen As Byte                 '//车牌字符个数 
      byEntireBelieve As Byte                  '//整个车牌的置信度,-100 
      byRes(35) As Byte                    '//保留 
      struPlateRect As NET_VCA_RECT      '//车牌位置 
      sLicense(MAX_LICENSE_LEN) As String     '//车牌号码 
      byBelieve(MAX_LICENSE_LEN) As Byte    '//各个识别字符的置信度,如检测到车牌"浙A12345", 置信度为,20,30,40,50,60,70,则表示"浙"字正确的可能性只有%,"A"字的正确的可能性是% 
End Type 
 
'//车辆信息 
Type NET_DVR_VEHICLE_INFO_ 
     dwIndex As Long                  '//车辆序号 
      byVehicleType As Byte        '//车辆类型 
      byColorDepth As Byte     '//车身颜色深浅 
      byColor As Byte                  '//车身颜色 
      byRes1(1) As Byte                '//保留 
      wSpeed As Integer                   '//单位km/h 
      wLength As Integer                  '//前一辆车的车身长度 
      byRes(36) As Byte                    '//保留 
End Type 
 
 
'//车辆信息 
Type NET_DVR_VEHICLE_INFO 
    dwIndex As Long '                  //车辆序号 
    byVehicleType As Byte '       //车辆类型 
    byColorDepth As Byte '     //车身颜色深浅 
    byColor As Byte '                  //车身颜色 
    byRes1 As Byte '                //保留 
    wSpeed As Integer '                  //单位km/h 
    wLength As Integer '                  //前一辆车的车身长度 
    byRes(36) As Byte '                    //保留 
End Type 
 
'//车牌检测结果 
Type LPNET_DVR_PLATE_RESULT 
       dwSize As Long                     '//结构长度 
        byResultType As Byte           '//0-视频识别结果,-图像识别结果 
        byChanIndex As Byte            '//通道号 
        byRes1(2) As Byte              '//保留 
       dwRelativeTime As Long     '//相对时间点 
        byAbsTime(32) As Byte      '//绝对时间点,yyyymmddhhmmssxxx,e.g.20090810235959999(毫秒) 
       dwPicLen As Long                   '//图片长度 
       dwPicPlateLen As Long          '//车牌小图片长度 
       dwVideoLen As Long                 '//录像内容长度 
        byTrafficLight As Byte             '//0-非红绿灯抓拍,1-绿灯时抓拍 As Byte2-红灯时抓拍 
        byPicNum As Byte               '//连拍的图片序号 
        byDriveChan As Byte                '//触发车道号 
        byRes2(33) As Byte                 '//保留 
      struPlateInfo As NET_DVR_PLATE_INFO    '//车牌信息结构 
     struVehicleInfo As NET_DVR_VEHICLE_INFO '//车辆信息 
        pBuffer1 As Long                  '// 当上传的是图片,指针指向图片信息,当上传的是视频,指针指向视频信息,如果不想获得图片或视频信息,传NULL 
        pBuffer2 As Long                  '// 当上传的是图片时,指向车牌图片的指针 
End Type 
'//后面紧跟图片数据和录像数据,只传一种,图片数据为场景图片+车牌小图片 
 
'//车牌报警NET_DVR_PLATE_RESULT 
'Const COMM_UPLOAD_PLATE_RESULT = 10240  '//上传车牌信息 
'//图像叠加信息配置 
Type NET_DVR_IMAGEOVERLAYCFG 
           dwSize As Long 
            byOverlayInfo As Byte '//叠加使能开关,0-不叠加,1-叠加 
            byOverlayMonitorInfo As Byte '//是否叠加监测点信息,0-不叠加,1-叠加 
            byOverlayTime As Byte '//是否叠加时间,0-不叠加,1-叠加 
            byOverlaySpeed As Byte '//是否叠加速度,0-不叠加,1-叠加 
            byOverlaySpeeding As Byte '//是否叠加超速比例,0-不叠加,1-叠加 
            byOverlayLimitFlag As Byte '//是否叠加限速标志,0-不叠加,1-叠加 
            byOverlayPlate As Byte '//是否叠加车牌,0-不叠加,1-叠加 
            byOverlayColor As Byte '//是否叠加车身颜色,0-不叠加,1-叠加 
            byOverlayLength As Byte '//是否叠加车长,0-不叠加,1-叠加 
            byOverlayType As Byte '//是否叠加车型,0-不叠加,1-叠加 
            byOverlayColorDepth As Byte '//是否叠加车身颜色深浅,0-不叠加,1-叠加 
            byOverlayDriveChan As Byte '//是否叠加车道,0-不叠加,1-叠加 
            byOverlayMilliSec As Byte '//叠加毫秒信息 0-不叠加,1-叠加 
            byOverlayIllegalInfo As Byte '//叠加违章信息 0-不叠加,1-叠加 
            byRes1(6) As Byte    '//保留 
            byMonitorInfo1(32) As Byte    '//监测点信息1 
            byMonitorInfo2(44) As Byte '//检测点信息2 
            byRes2(52) As Byte    '//保留 
End Type 
 
'//单IO触发抓拍功能配置 
Type NET_DVR_SNAPCFG 
       dwSize As Long 
        byRelatedDriveWay As Byte '//触发IO关联的车道号 
        bySnapTimes As Byte '//线圈抓拍次数,0-不抓拍,非0-连拍次数,目前最大5次 
        byRes1(2) As Byte 
        wIntervalTime(4) As Integer '//连拍间隔时间1,ms 
        byRes2(24) As Byte '//保留字节 
End Type 
 
Type NET_DVR_SNAP_ABILITY 
     dwSize As Long 
      byIoInNum As Byte '//IO输入口数 
      byIoOutNum As Byte '//IO输出口数 
      bySingleSnapNum As Byte '//单IO触发组数 
      byLightModeArrayNum As Byte '//红绿灯模式组数 
      byMeasureModeArrayNum As Byte '//测速模式组数 
      byPlateEnable As Byte '//车牌识别能力 
      byRes(30) As Byte 
End Type 
Const SNAPCAMERA_ABILITY = 768         '//抓拍机能力集 
 
Type NET_DVR_TRIGCOORDINATE 
    wTopLeftX As Integer '/*线圈左上角横坐标(2个字节)*/ 
    wTopLeftY As Integer '/*线圈左上角纵坐标(2个字节)*/ 
    wWdith As Integer '/*线圈宽度(2个字节)*/ 
    wHeight As Integer '/*线圈高度(2个字节)*/ 
End Type 
 
Type NET_DVR_VTPARAM 
       dwSize As Long 
        byEnable As Byte  '/* 是否使能虚拟线圈,0-不使用,1-使用*/ 
        byIsDisplay As Byte '/* 是否显示虚拟线圈,0-不显示,1-显示*/ 
        byRes1(6) As Byte 
        struTrigCoordinate As NET_DVR_TRIGCOORDINATE 
        struRes(5) As NET_DVR_TRIGCOORDINATE 
        byTotalLaneNum As Byte '/*视频触发的车道数1*/ 
        byPolarLenType As Byte '/*偏振镜类型,0:不加偏振镜 As Byte1:加施耐德偏振镜。*/ 
        byDayAuxLightMode As Byte '/*白天辅助照明模式,0:无辅助照明 As Byte1:LED灯照明 As Byte2:闪光灯照明*/ 
        byLoopToCalRoadBright As Byte '/*用以计算路面亮度的车道(虚拟线圈)*/ 
        byRoadGrayLowTh As Byte '/*路面亮度低阈值初始化值1*/ 
        byRoadGrayHighTh As Byte '/*路面亮度高阈值初始化值140*/ 
        wLoopPosBias As Integer '/*晚间触发线圈位移30*/ 
       dwHfrShtterInitValue As Long '/*连续图像曝光时间的初始值2000*/ 
       dwSnapShtterInitValue As Long '/*抓拍图像曝光时间的初始值500*/ 
       dwHfrShtterMaxValue As Long '/*连续图像曝光时间的最大值20000*/ 
       dwSnapShtterMaxValue As Long '/*抓拍图像曝光时间的最大值1500*/ 
       dwHfrShtterNightValue As Long '/*晚间连续图像曝光时间的设置值3000*/ 
       dwSnapShtterNightMinValue As Long '/*晚间抓拍图像曝光时间的最小值3000*/ 
       dwSnapShtterNightMaxValue As Long '/*晚间抓拍图像曝光时间的最大值5000*/ 
       dwInitAfe As Long '/*增益的初始值200*/ 
       dwMaxAfe As Long '/*增益的最大值400*/ 
       wResolutionX As Integer '/* 设备当前分辨率宽*/ 
       wResolutionY As Integer '/* 设备当前分辨率高*/ 
        byRes2(96) As Byte 
End Type 
 
Type NET_DVR_SNAPENABLECFG 
           dwSize As Long 
            byPlateEnable As Byte '//是否支持车牌识别,0-不支持,1-支持 
            byDetectBrightness As Byte '//自动检测亮度使能闪光灯0-不检测 As Byte1-检测 
            byBrightnessThreld As Byte '//使能闪光灯亮度阈值,范围0-100,高于阈值闪,低于阈值不闪 
            byRes(69) As Byte '//保留 
End Type 
 
'Const NAME_LEN = 32 
'Const PASSWD_LEN = 16 
'/* ftp 上传参数*/ 
Type NET_DVR_FTPCFG 
       dwSize As Long 
       dwEnableFTP As Long            '/*是否启动ftp上传功能*/ 
       sFTPIP As String * 16             '/*ftp 服务器*/ 
       dwFTPPort As Long              '/*ftp端口*/ 
        sUserName As String * NAME_LEN    '/*用户名*/ 
        sPassword As String * PASSWD_LEN  '/*密码*/ 
       dwDirLevel As Long '/*0 = 不使用目录结构,直接保存在根目录,1 = 使用1级目录,2=使用2级目录*/ 
       wTopDirMode As Integer    '/* 一级目录,0x1 = 使用设备名,0x2 = 使用设备号,0x3 = 使用设备ip地址,0x4=使用监测点,0x5=使用时间(年月)*/ 
       wSubDirMode As Integer    '/* 二级目录,0x1 = 使用通道名,0x2 = 使用通道号,,0x3=使用时间(年月日),0x4=使用车道号*/ 
        byRes(24) As Byte 
End Type 
 
'/*可用来命名图片的相关元素 */ 
Const PICNAME_ITEM_DEV_NAME = 1         '/*设备名*/ 
Const PICNAME_ITEM_DEV_NO = 2            '/*设备号*/ 
Const PICNAME_ITEM_DEV_IP = 3          '/*设备IP*/ 
Const PICNAME_ITEM_CHAN_NAME = 4       '/*通道名*/ 
Const PICNAME_ITEM_CHAN_NO = 5         '/*通道号*/ 
Const PICNAME_ITEM_TIME = 6            '/*时间*/ 
Const PICNAME_ITEM_CARDNO = 7          '/*卡号*/ 
Const PICNAME_ITEM_PLATE_NO = 8        '/*车牌号码*/ 
Const PICNAME_ITEM_PLATE_COLOR = 9     '/*车牌颜色*/ 
Const PICNAME_ITEM_CAR_CHAN = 10       '/*车道号*/ 
Const PICNAME_ITEM_CAR_SPEED = 11      '/*车辆速度*/ 
Const PICNAME_ITEM_CARCHAN = 12        '/*监测点*/ 
Const PICNAME_MAXITEM = 15 
 
'//图片命名 
Type NET_DVR_PICTURE_NAME 
        byItemOrder(PICNAME_MAXITEM) As Byte   '/*  桉数组定义文件命名的规则 */ 
        byDelimiter As Byte        '/*分隔符,一般为'_'*/ 
End Type 
 
'/* 串口抓图设置*/ 
Type NET_DVR_SERIAL_CATCHPIC_PARA 
        byStrFlag As Byte  '/*串口数据开始符*/ 
        byEndFlag As Byte  '/*结束符*/ 
        wCardIdx As Integer   '/*卡号相对起始位*/ 
       dwCardLen As Long  '/*卡号长度*/ 
       dwTriggerPicChans As Long  '/*所触发的通道号,按位,从第1位开始计,即0x2表示第一通道*/ 
End Type 
 
'//图片质量 
Type NET_DVR_JPEGPARA 
    '/*注意:当图像压缩分辨率为VGA时,支持0=CIF, 1=QCIF, 2=D1抓图, 
    '当分辨率为3=UXGA(1600x1200), 4=SVGA(800x600), 5=HD720p(1280x720),6=VGA,7=XVGA, 8=HD900p 
    '仅支持当前分辨率的抓图*/ 
    wPicSize As Integer               '/* 0=CIF, 1=QCIF, 2=D1 3=UXGA(1600x1200), 4=SVGA(800x600), 5=HD720p(1280x720),6=VGA*/ 
    wPicQuality As Integer             '/* 图片质量系数 0-最好 1-较好 2-一般 */ 
End Type 
'Const MAX_ANALOG_CHANNUM = 32              '//最大32个模拟通道 
'Const MAX_IP_CHANNEL = 32                  '//允许加入的最多IP通道数 
'Const MAX_CHANNUM_V30 = MAX_ANALOG_CHANNUM + MAX_IP_CHANNEL   '//64 
'Const MAX_ANALOG_ALARMIN = 32              '//最大32路模拟报警输入 
'Const MAX_IP_ALARMIN = 128                 '//允许加入的最多报警输入数 
'Const MAX_ALARMIN_V30 = MAX_ANALOG_ALARMIN + MAX_IP_ALARMIN  '//160 
'//DVR抓图参数配置(基线) 
Type NET_DVR_JPEGCFG_V30 
    dwSize As Long 
    struJpegPara(MAX_CHANNUM_V30) As NET_DVR_JPEGPARA '/*每个通道的图像参数*/ 
    wBurstMode As Integer                         '/*抓图方式,按位设置.0x1=报警输入触发,0x2=移动侦测触发 0x4=232触发,0x8=485触发,0x10=网络触发*/ 
    wUploadInterval As Integer                    '/*图片上传间隔(秒)(0,65535)*/ 
    struPicNameRule As NET_DVR_PICTURE_NAME    '/* 图片命名规则 */ 
    bySaveToHD As Byte     '/*是否保存到硬盘*/ 
    byRes1 As Byte 
    wCatchInterval As Integer     '/*抓图间隔(毫秒)(0,65535)*/ 
    byRes2(12) As Byte 
    struRs232Cfg As NET_DVR_SERIAL_CATCHPIC_PARA 
    struRs485Cfg As NET_DVR_SERIAL_CATCHPIC_PARA 
    dwTriggerPicTimes(MAX_CHANNUM_V30) As Long   '/* 每个通道一次触发拍照次数 */ 
    dwAlarmInPicChanTriggered(MAX_ALARMIN_V30) As Long '/*报警触发抓拍通道,按位设置,从第1位开始*/ 
End Type 
 
'//抓拍触发请求结构(保留) 
Type LPNET_DVR_MANUALSNAP 
    byRes(24) As Byte  '//保留 
End Type 
 
'字符叠加参数子结构体 
 
Type NET_DVR_SHOWSTRINGINFO 
    wShowString As Integer              '预览的图象上是否显示字符:0-不显示,1-显示(显示区域范围为704*576,单个字符的大小为32*32) 
    wStringSize As Integer              '该行字符的长度,不能大于44个字符 
    wShowStringTopLeftX As Integer      '字符显示位置的x坐标 
    wShowStringTopLeftY As Integer      '字符显示位置的y坐标 
    sString As String * 44                  '要显示的字符内容 
End Type 
 
 
'字符叠加参数结构体 
 
Type NET_DVR_SHOWSTRING 
    dwSize As Long                                                '结构体大小 
    struStringInfo(MAX_STRINGNUM) As NET_DVR_SHOWSTRINGINFO       '要显示的字符内容 
End Type 
 
 
'服务器参数结构体 
 
Type NET_DVR_DEVICECFG 
    dwSize As Long 
    sDVRName As String * 32 
    dwDVRID As Long 
    dwRecycleRecord As Long 
    sSerialNumber(47) As Byte 
    dwSoftwareVersion As Long 
    dwSoftwareBuildDate As Long 
    dwDSPSoftwareVersion As Long 
    dwDSPSoftwareBuildDate As Long 
    dwPanelVersion As Long 
    dwHardwareVersion As Long 
    byAlarmInPortNum As Byte 
    byAlarmOutPortNum As Byte 
    byRS232Num As Byte 
    byRS485Num As Byte 
    byNetworkPortNum As Byte 
    byDiskCtrlNum As Byte 
    byDiskNum As Byte 
    byDVRType As Byte 
    byChanNum As Byte 
    byStartChan As Byte 
    byDecordChans As Byte 
    byVGANum As Byte 
    byUSBNum As Byte 
    byAuxoutNum As Byte 
    byAudioNum As Byte 
    byIPChanNum As Byte 
End Type 
 
 
'起止时间段参数结构体 
 
Type NET_DVR_SCHEDTIME 
    byStartHour As Byte         '录像开始时间: 时 
    byStartMin As Byte          '录像开始时间: 分 
    byStopHour As Byte          '录像结束时间: 时 
    byStopMin As Byte           '录像结束时间: 分 
End Type 
 
 
'报警和异常处理结构体 
 
Type NET_DVR_HANDLEEXCEPTION 
    dwHandleType As Long        '处理方式: 
                                           '00: 无响应; 01: 监视器上警告; 02: 声音警告; 04: 上传中心; 08: 触发报警输出; 10: Jpeg抓图并上传EMail 
    byRelAlarmOut(3) As Byte    '报警触发的输出通道,0-不触发,1-触发输出 
End Type 
 
 
 
'移动侦测参数结构体 
 
Type NET_DVR_MOTION 
    byMotionScope(17, 21) As Byte                       '移动侦测区域,共有22*18个小宏块,取值为1表示该宏块设定为移动侦测区域,0表示不设定为移动侦测区域 
    byMotionSensitive As Byte                           '移动侦测灵敏度,取值范围(0,5),若取值为0xff表示关闭,值越大越灵敏 
    byEnableHandleMotion As Byte                        '是否处理移动侦测:0-不处理,1-处理 
    reservedData(1) As Byte                             '保留,置为0 
    strMotionHandleType As NET_DVR_HANDLEEXCEPTION      '处理方式 
    struAlarmTime(6, 3) As NET_DVR_SCHEDTIME            '布防时间 
    byRelRecordChan(15) As Byte                         '报警触发的录象通道,为1表示触发该通道 
End Type 
 
 
 
'信号丢失报警参数结构体 
Type NET_DVR_VILOST 
    byEnableHandleVILost As Byte                        '是否处理信号丢失报警:0-不处理,1-处理 
    strVILostHandleType As NET_DVR_HANDLEEXCEPTION      '处理方式参数 
    struAlarmTime(6, 3) As NET_DVR_SCHEDTIME            '布防时间参数 
End Type 
 
 
'遮挡报警参数结构体 
 
Type NET_DVR_HIDEALARM 
    dwEnableHideAlarm As Long                           '是否启动遮挡报警:0-否,1-低灵敏度,2-中灵敏度,3-高灵敏度 
    wHideAlarmAreaTopLeftX As Integer                   '遮挡区域的x坐标 
    wHideAlarmAreaTopLeftY As Integer                   '遮挡区域的y坐标 
    wHideAlarmAreaWidth As Integer                      '遮挡区域的宽 
    wHideAlarmAreaHeight As Integer                     '遮挡区域的高 
    strHideAlarmHandleType As NET_DVR_HANDLEEXCEPTION   '处理方法 
    struAlarmTime(6, 3) As NET_DVR_SCHEDTIME            '布防时间 
End Type 
 
 
'遮挡区域参数结构体 
 
Type NET_DVR_SHELTER 
    wHideAreaTopLeftX As Integer                '遮挡区域的x坐标 
    wHideAreaTopLeftY As Integer                '遮挡区域的y坐标 
    wHideAreaWidth As Integer                   '遮挡区域的宽 
    wHideAreaHeight As Integer                  '遮挡区域的高 
End Type 
 
 
'通道参数结构体 
 
Type NET_DVR_PICCFG 
    dwSize As Long 
    sChanName As String * 32 
    dwVideoFormat As Long 
    byBrightness As Byte 
    byContrast As Byte 
    bySaturation As Byte 
    byHue As Byte 
    dwShowChanName As Long 
    wShowNameTopLeftX As Integer 
    wShowNameTopLeftY As Integer 
    struVILost As NET_DVR_VILOST 
    struMotion As NET_DVR_MOTION 
    struHideAlarm As NET_DVR_HIDEALARM 
    dwEnableHide As Long 
    wHideAreaTopLeftX As Integer 
    wHideAreaTopLeftY As Integer 
    wHideAreaWidth As Integer 
    wHideAreaHeight As Integer 
    dwShowOsd As Long 
    wOSDTopLeftX As Integer 
    wOSDTopLeftY As Integer 
    byOSDType As Byte 
    byDispWeek As Byte 
    byOSDAttrib As Byte 
    reservedData2 As String 
End Type 
 
'通道图像结构体 
 
Type NET_DVR_PICCFG_EX 
    dwSize As Long 
    sChanName As String * 32 
    dwVideoFormat As Long 
    byBrightness As Byte 
    byContrast As Byte 
    bySaturation As Byte 
    byHue As Byte 
    dwShowChanName As Long 
    wShowNameTopLeftX As Integer 
    wShowNameTopLeftY As Integer 
    struVILost As NET_DVR_VILOST 
    struMotion As NET_DVR_MOTION 
    struHideAlarm As NET_DVR_HIDEALARM 
    dwEnableHide As Long 
    struShelter(3) As NET_DVR_SHELTER 
    dwShowOsd As Long 
    wOSDTopLeftX As Integer 
    wOSDTopLeftY As Integer 
    byOSDType As Byte 
    byDispWeek As Byte 
    byOSDAttrib As Byte 
    byHourOsdType As Byte 
End Type 
 
 
 
'设备参数结构体 
Type NET_DVR_DEVICEINFO 
    sSerialNumber As String * 48     '序列号 
    byAlarmInPortNum As Byte         '报警输入个数 
    byAlarmOutPortNum As Byte       '报警输出个数 
    byDiskNum As Byte               '硬盘个数 
    byDVRType As Byte               '设备类型 
    byChanNum As Byte               '设备模拟通道个数 
    byStartChan As Byte             '起始通道号,目前设备通道号从1开始 
End Type 
 
 
'声明NET_DVR_DEVICEINFO_V30参数结构体 
Type NET_DVR_DEVICEINFO_V30 
    sSerialNumber As String * 48      '序列号 
    byAlarmInPortNum As Byte        'DVR报警输入个数 
    byAlarmOutPortNum As Byte      'DVR报警输出个数 
    byDiskNum As Byte                  'DVR硬盘个数 
    byDVRType As Byte                 'DVR类型, 1:DVR 2:ATM DVR 3:DVS ...... 
    byChanNum As Byte                 'DVR 通道个数 
    byStartChan As Byte                '起始通道号,例如DVS-1,DVR - 1 
    byAudioChanNum As Byte         '设备语音通道数 
    byIPChanNum As Byte             '设备最大数字通道个数 
    byZeroChanNum As Byte 
    byMainProto As Byte 
    bySubProto As Byte 
    bySupport As Byte 
    bySupport1 As Byte 
    bySupport2 As Byte 
    wDevType As Integer 
    bySupport3 As Byte 
    byMultiStreamProto As Byte 
    byStartDChan As Byte 
    byStartDTalkChan As Byte 
    byHighDChanNum As Byte 
    bySupport4 As Byte 
    byLanguageType As Byte 
    byRes1(9) As Byte                 '保留 
End Type 
 
 
 
'声明ntp参数结构 
Type NET_DVR_NTPPARA 
    sNTPServer As String * 64      'ntp服务器的ip地址或域名 
    wInterval As Integer              'ntp校时的时间间隔 
    byEnableNTP As Byte            '是否启用ntp 
    cTimeDifferenceH As Byte      '与国际标准时间的 小时偏移-12 ... +13 
    cTimeDifferenceM As Byte      '与国际标准时间的 分钟偏移0, 30, 45 
    res1 As Byte                        '保留 
    wNtpPort As Integer              'ntp server port 9000新增 设备默认为123 
    res2(7) As Byte                '保留 
End Type 
 
'声明LPNET_DVR_TIME参数结构体 
Type LPNET_DVR_TIME 
    dwYear As Long    '年 
    dwMonth As Long   '月 
    dwDay As Long     '日 
    dwHour As Long    '时 
    dwMinute As Long  '分 
    dwSecond As Long  '秒 
End Type 
 
'软解码预览参数 
Type NET_DVR_CLIENTINFO 
    lChannel As Long      '通道号 
    lLinkMode As Long     '最高位(31)为0表示主码流,为1表示子,0-30位表示码流连接方式: 0:TCP方式,1:UDP方式,2:多播方式,3 - RTP方式,4-音视频分开(TCP) 
    hPlayWnd As Long      '播放窗口的句柄,为NULL表示不播放图象 
    sMultiCastIP As Long  '多播组地址 
 
End Type 
 
'JPEG图像信息结构体 
 
Type LPNET_DVR_JPEGPARA 
    wPicSize As Integer         '图片尺寸:0-CIF,1-QCIF,2-D1,3-UXGA,4-SVGA,5-HD720p,6-VGA,7-XVGA,8-HD900p 
    wPicQuality As Integer      '图片质量系数:0-最好,1-较好,2-一般 
End Type 
 
'预览参数结构体 
 
Type LPNET_DVR_CLIENTINFO 
     lChannel As Long               '通道号 
     lLinkMode As Long              '最高位(31)为0表示主码流,为1表示子码流0~30位表示连接方式:0-TCP方式;1-UDP方式;2-多播方式;3-RTP方式 
     hPlayWnd As Long               '播放窗口的句柄,为NULL表示不显示图像 
     sMultiCastIP As Long           '多播组地址 
End Type 
 
Type NET_DVR_PREVIEWINFO 
    lChannel As Long 
    dwStreamType As Integer 
    dwLinkMode As Integer 
    hPlayWnd As Long 
    bBlocked As Boolean 
    bPassbackRecord As Boolean 
    byPreviewMode As Byte 
    byStreamID(32) As Byte 
    byProtoType As Byte 
    byRes(222) As Byte 
End Type 
 
'################################################ 
'声明初始化函数(NET_DVR_Init) 
Public Declare Function NET_DVR_Init Lib "HCNETSDK.dll" () As Boolean 
Public Declare Function NET_DVR_Cleanup Lib "HCNETSDK.dll" () As Boolean 
Public Declare Function NET_DVR_SetConnectTime Lib "HCNETSDK.dll" (ByVal dwWaitTimem As Integer, ByVal dwTryTimes As Integer) As Boolean 
Public Declare Function NET_DVR_SetReconnect Lib "HCNETSDK.dll" (ByVal dwInterval As Integer, ByVal bEnableRecon As Boolean) As Boolean 
 
 
'声明用户注册函数(NET_DVR_Login_V30) 
Public Declare Function NET_DVR_Login_V30 Lib "HCNETSDK.dll" ( _ 
               ByVal sDVRIP As String, _ 
               ByVal wDVRPort As Integer, _ 
               ByVal sUserName As String, _ 
               ByVal sPassword As String, _ 
               ByRef lpDeviceInfo As NET_DVR_DEVICEINFO_V30) As Long 
                
'用户注册设备(NET_DVR_Login) 
 
Public Declare Function NET_DVR_Login Lib "HCNETSDK.dll" ( _ 
                ByVal sDVRIP As String, _ 
                ByVal wDVRPort As Integer, _ 
                ByVal sUserName As String, _ 
                ByVal sPassword As String, _ 
                ByRef lpDeviceInfo As NET_DVR_DEVICEINFO) As Long 
                 
'                sDVRIP 
'                [In] 设备IP地址 
'                wServerPort 
'                [In] 设备端口号 
'                sUserName 
'                [In] 登录的用户名 
'                sPassword 
'                [In] 用户密码 
'                lpDeviceInfo 
'                [out] 设备信息 
 
 
'声明注销用户函数(NET_DVR_Logout) 
Public Declare Function NET_DVR_Logout Lib "HCNETSDK.dll" (ByVal lUserID As Long) As Boolean 
 
 
'启动图像预览功能 
Public Declare Function NET_DVR_RealPlay_V30 Lib "HCNETSDK.dll" ( _ 
               ByVal lUserID As Long, _ 
               ByRef lpClientInfo As NET_DVR_CLIENTINFO, _ 
               ByVal fRealDataCallBack_V30 As Long, _ 
               ByVal pUser As Long, _ 
               ByVal bBlocked As Boolean) As Long 
                
Public Declare Function NET_DVR_RealPlay_V40 Lib "HCNETSDK.dll" ( _ 
               ByVal lUserID As Long, _ 
               ByRef lpClientInfo As NET_DVR_PREVIEWINFO, _ 
               ByRef fRealDataCallBack_V30 As REALDATACALLBACK, _ 
               ByVal pUser As Long) As Long 
 
 
'启动图像预览功能 
Public Declare Function NET_DVR_RealPlay Lib "HCNETSDK.dll" ( _ 
               ByVal lUserID As Long, _ 
               ByRef lpClientInfo As LPNET_DVR_CLIENTINFO) As Long 
                
'                lUserID 
'                [in] NET_DVR_Login()或NET_DVR_Login_V30()的返回值 
'                lpClientInfo 
'                [In] 预览参数 
 
 
'停止预览 
Public Declare Function NET_DVR_StopRealPlay Lib "HCNETSDK.dll" (ByVal lUserID As Long) As Boolean 
 
 
'获取预览视频显示参数 
    'lRealHandle            NET_DVR_RealPlay或者NET_DVR_RealPlay_V30的返回值 
    'pBrightValue           亮度指针,取值范围[1,10] 
    'pContrastValue         对比度指针,取值范围[1,10] 
    'pSaturationValue       饱和度指针,取值范围[1,10] 
    'pHueValue              色度指针,取值范围[1,10] 
Public Declare Function NET_DVR_ClientGetVideoEffect Lib "HCNETSDK.dll" ( _ 
                ByVal lRealHandle As Long, _ 
                ByRef pBrightValue As Long, _ 
                ByRef pContrastValue As Long, _ 
                ByRef pSaturationValue As Long, _ 
                ByRef pHueValue As Long) As Boolean 
 
 
'设置预览视频显示参数 
Public Declare Function NET_DVR_ClientSetVideoEffect Lib "HCNETSDK.dll" ( _ 
                ByVal lRealHandle As Long, _ 
                ByVal dwBrightValue As Long, _ 
                ByVal dwContrastValue As Long, _ 
                ByVal dwSaturationValue As Long, _ 
                ByVal dwHueValue As Long) As Boolean 
 
 
 
'声明按时间下载函数(NET_DVR_GetFileByTime) 
Public Declare Function NET_DVR_GetFileByTime Lib "HCNETSDK.dll" ( _ 
                ByVal lUserID As Long, _ 
                ByVal lChannel As Long, _ 
                lpStartTime As LPNET_DVR_TIME, _ 
                lpStopTime As LPNET_DVR_TIME, _ 
                ByVal sSavedFileName As String) As Long 
                 
'开始下载 
Public Declare Function NET_DVR_PlayBackControl Lib "HCNETSDK.dll" ( _ 
                ByVal lPlayHandle As Long, _ 
                ByVal dwControlCode As Long, _ 
                ByVal dwInValue As Long, _ 
                ByVal lpOutValue As Long) As Long 
                 
 
'设置参数大配置接口(NET_DVR_SetDVRConfig) 
Public Declare Function NET_DVR_SetDVRConfig Lib "HCNETSDK.dll" ( _ 
                ByVal lUserID As Long, _ 
                ByVal dwCommand As Long, _ 
                ByVal lChannel As Long, _ 
                lpInBuffer As Any, _ 
                ByVal dwInBufferSize As Long) As Long 
                 
 
'获取参数大配置接口(NET_DVR_GetDVRConfig) 
Public Declare Function NET_DVR_GetDVRConfig Lib "HCNETSDK.dll" ( _ 
                ByVal lUserID As Long, _ 
                ByVal dwCommand As Long, _ 
                ByVal lChannel As Long, _ 
                lpOutBuffer As Any, _ 
                ByVal dwOutBufferSize As Long, _ 
                ByRef dwReturned As Long) As Long 
                 
 
'单帧数据捕获并保存成BMP位图 
Public Declare Function NET_DVR_CapturePicture Lib "HCNETSDK.dll" ( _ 
                ByVal lRealHandle As Long, _ 
                ByVal sPicFileName As String) As Boolean 
                 
 
'单帧数据捕获并保存成JPEG图 
Public Declare Function NET_DVR_CaptureJPEGPicture Lib "HCNETSDK.dll" ( _ 
               ByVal lUserID As Long, _ 
               ByVal lChannel As Long, _ 
               ByRef lpJpegPara As LPNET_DVR_JPEGPARA, _ 
               ByVal sPicFileName As String) As Boolean 
                
       '单帧数据捕获并保存成JPEG图 
Public Declare Function NET_DVR_ManualSnap Lib "HCNETSDK.dll" ( _ 
               ByVal lUserID As Long, _ 
               ByVal lpInter As LPNET_DVR_MANUALSNAP, _ 
               ByRef lpOuter As LPNET_DVR_PLATE_RESULT _ 
) As Boolean 
 
                
'获得当前错误码 
Public Declare Function NET_DVR_GetLastError Lib "HCNETSDK.dll" () As Long 
Public Declare Function NET_DVR_SetExceptionCallBack_V30 Lib "HCNETSDK.dll" (ByVal nMessage As Byte, ByVal hWnd As Integer, ByRef cbExceptionCallBack As fExceptionCallBack, ByVal pUser As Integer) As Boolean 
 
 
'消息回调函数 
Type REALDATACALLBACK 
        lRealHandle As Long 
        dwDataType As Long 
        pBuffer As Long 
        dwBufSize As Long 
        pUser As Long 
End Type 
 
Type fExceptionCallBack 
       dwType As Integer 
       lUserID As Long 
       lHandle As Long 
       pUser As Integer 
End Type 
  
'回调函数指针传入 
Public Function PtrToLong(ByVal func As Long) As Long 
    PtrToLong = func 
End Function