Exemplo 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));
 }
Exemplo 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));
        }