Example #1
0
        /// <summary>
        /// 登陆请求
        /// </summary>
        /// <param name="devIp">ip</param>
        /// <param name="devPort">端口</param>
        /// <param name="userName">用户名</param>
        /// <param name="authPwd">密码</param>
        /// <param name="timeOutS">超时时间(秒)</param>
        /// <param name="disConnectd">断开连接通知回调函数</param>
        /// <param name="userData">用户参数</param>
        /// <returns>成功返回TRUE,失败返回FALSE</returns>
        public bool Login(string devIp,
                          UInt16 devPort,
                          string userName,
                          string authPwd,
                          UInt32 timeOutS,
                          UInt32 userData)
        {
            TVDASDK_LOGIN_INFO info = new TVDASDK_LOGIN_INFO();

            info.szDevIp    = devIp;
            info.szAuthPwd  = authPwd;
            info.szUserName = userName;
            info.wDevPort   = devPort;
            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, string.Format("IVXSDKProtocol VdaSdk_Login chDevIp:{0},wDevPort:{1},szUserName:{2},szAuthPwd:{3},dwTimeoutS:{4},dwUserData:{5}",
                                                                                                       devIp, devPort, userName, authPwd, timeOutS, userData));

            m_TfuncDisConnectNtfCB = TfuncDisConnectNtfCB;

            bool retVal = IVXSDKProtocol.VdaSdk_Login(info, timeOutS, m_TfuncDisConnectNtfCB, userData);

            if (!retVal)
            {
                // 调用失败,抛异常
                CheckError();
            }

            MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol VdaSdk_Login ret:" + retVal);
            return(retVal);
        }
Example #2
0
 public static extern bool VdaSdk_Login(TVDASDK_LOGIN_INFO tLoginInfo, UInt32 dwTimeoutS,
                                        TfuncDisConnectNtfCB pFuncDisConnectNtf, UInt32 dwUserData);