Esempio n. 1
0
 public static void Release(ref ComRef <T> comRef)
 {
     if (comRef != null)
     {
         comRef.Dispose();
         comRef = null;
     }
 }
Esempio n. 2
0
        public static void Terminate(ref ComRef <T> comRef)
        {
            if (comRef != null)
            {
                int refCount = Marshal.FinalReleaseComObject(comRef.Instance);
                Trace.WriteLine("FinalReleaseComObject - ref count: " + refCount);

                comRef = null;
            }
        }
Esempio n. 3
0
 public static T GetInstance(ComRef <T> comRef)
 {
     return(comRef == null ? null : comRef.Instance);
 }