tryIntPtr pUnk = Marshal.GetIUnknownForObject(myComObject);
int refCount = Marshal.Release(pUnk);

解决方案 »

  1.   

    Thanks, actually I've tried this, doesn't work at all. I also tried:
                Marshal.ReleaseComObject(member);
              //Marshal.FinalReleaseComObject(member);
                member = null;
    I can get the return count number=0 for the Release action, however the com object seems still exist, unless I run GC.cellect(). Any other helps?