Example #1
0
        public long f4Fun(IntPtr es)
        {
            long fun = ltf.GetJsParameter(es, 0);
            long arg = ltf.String2JsValue(es, "C#执行了回掉函数");

            long[] ptarg      = { arg };
            IntPtr arrayStore = Marshal.AllocHGlobal(ptarg.Length * sizeof(long));

            Marshal.Copy(ptarg, 0, arrayStore, ptarg.Length);
            ltf.JsCall(es, fun, arrayStore, 1);
            return(ltf.JsUndefined());
        }