Ejemplo n.º 1
0
 public void PufferPluginUninit()
 {
     if (mCppPufferMgr == System.IntPtr.Zero)
     {
         return;
     }
     UninitPufferManager(mCppPufferMgr);
     if (mCallback != null)
     {
         mCallback.DeleteCppVersionCallBack();
         mCallback = null;
     }
 }
Ejemplo n.º 2
0
        public bool PufferPluginInit(IIPSMobilePufferCallbackInterface cb, string config)
        {
            mCallback = new IIPSPufferPluginCallBack(cb);
            mCallback.CreateCppPufferCallBack();
            if (mCppPufferMgr == System.IntPtr.Zero)
            {
                return(false);
            }
            byte[]   configBuffer = System.Text.Encoding.ASCII.GetBytes(config);
            GCHandle pinnedArray  = GCHandle.Alloc(configBuffer, GCHandleType.Pinned);

            System.IntPtr configPointer = pinnedArray.AddrOfPinnedObject();
            pinnedArray.Free();
            return(InitPufferManager(mCppPufferMgr, mCallback.mCallBack, (System.UInt32)config.Length, configPointer));
        }