Example #1
0
        //结束会话重载无参
        public static bool closeAllocion1()
        {
            string sid1 = SessionId.ToString();

            return(HkSDK.OpenSDK_FreeSession(sid1) == 0);
        }
Example #2
0
        /*
         * public static bool allocion()
         * {
         *  HkSDK.MsgHandler Handler = new HkSDK.MsgHandler(HkSDK.HandlerWork);
         *  IntPtr UserID =Marshal.StringToHGlobalAnsi(userId);
         *  bool result = (HkSDK.OpenSDK_AllocSession(Handler, UserID, ref SessionId, ref SessionIdLth, false, 0xEA60) == 0);
         *  SessionIdstr = Marshal.PtrToStringAnsi(SessionId, SessionIdLth);
         *  return SessionIdstr;
         * }*/

        //结束会话
        public static bool closeAllocion(IntPtr sid)
        {
            string sid1 = sid.ToString();

            return(HkSDK.OpenSDK_FreeSession(sid1) == 0);
        }