Example #1
0
 // Token: 0x0600089A RID: 2202 RVA: 0x0001D590 File Offset: 0x0001B790
 internal void RegisterWithHost()
 {
     if (AppDomainManager.HasHost())
     {
         IntPtr intPtr = IntPtr.Zero;
         RuntimeHelpers.PrepareConstrainedRegions();
         try
         {
             intPtr = Marshal.GetIUnknownForObject(this);
             AppDomainManager.RegisterWithHost(intPtr);
         }
         finally
         {
             if (!intPtr.IsNull())
             {
                 Marshal.Release(intPtr);
             }
         }
     }
 }
Example #2
0
        internal void RegisterWithHost()
        {
            if (!AppDomainManager.HasHost())
            {
                return;
            }
            IntPtr num = IntPtr.Zero;

            RuntimeHelpers.PrepareConstrainedRegions();
            try
            {
                num = Marshal.GetIUnknownForObject((object)this);
                AppDomainManager.RegisterWithHost(num);
            }
            finally
            {
                if (!num.IsNull())
                {
                    Marshal.Release(num);
                }
            }
        }