Esempio n. 1
0
 internal CfrClientBase(CtorWithGCHandleRemoteCall call)
 {
     System.Runtime.InteropServices.GCHandle handle =
         System.Runtime.InteropServices.GCHandle.Alloc(this, System.Runtime.InteropServices.GCHandleType.Weak);
     call.gcHandlePtr = System.Runtime.InteropServices.GCHandle.ToIntPtr(handle);
     call.RequestExecution();
     SetRemotePtr(new RemotePtr(call.__retval));
 }
Esempio n. 2
0
        //static int cfrTaskCount;

        internal CfrBaseClient(CtorWithGCHandleRemoteCall call)
        {
            GCHandle handle = GCHandle.Alloc(this, GCHandleType.Weak);

            call.gcHandlePtr = GCHandle.ToIntPtr(handle);
            call.RequestExecution();
            SetRemotePtr(new RemotePtr(call.__retval));
            //if(this is CfrTask) Debug.Print("CfrTask created: " + System.Threading.Interlocked.Increment(ref cfrTaskCount));
        }