Пример #1
0
        public static bool RemoveGraphFromRot(ref int cookie)
        {
            UCOMIRunningObjectTable rot = null;

            try {
                int hr = GetRunningObjectTable(0, out rot);
                if (hr < 0)
                {
                    Marshal.ThrowExceptionForHR(hr);
                }

                rot.Revoke(cookie);
                cookie = 0;
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
            finally
            {
                if (rot != null)
                {
                    Marshal.ReleaseComObject(rot);
                }
                rot = null;
            }
        }
Пример #2
0
        // Token: 0x060002FA RID: 762 RVA: 0x00012E4C File Offset: 0x0001104C
        public static bool RemoveGraphFromRot(ref int cookie)
        {
            UCOMIRunningObjectTable ucomirunningObjectTable = null;
            bool result;

            try
            {
                int runningObjectTable = DsROT.GetRunningObjectTable(0, ref ucomirunningObjectTable);
                ucomirunningObjectTable.Revoke(cookie);
                cookie = 0;
                result = true;
            }
            catch (Exception ex)
            {
                result = false;
            }
            finally
            {
                if (ucomirunningObjectTable != null)
                {
                    Marshal.ReleaseComObject(ucomirunningObjectTable);
                }
                ucomirunningObjectTable = null;
            }
            return(result);
        }
Пример #3
0
        public static bool RemoveGraphFromRot(ref int cookie)
        {
            UCOMIRunningObjectTable pprot = null;
            bool flag;

            try
            {
                int runningObjectTable = GetRunningObjectTable(0, out pprot);
                if (runningObjectTable < 0)
                {
                    Marshal.ThrowExceptionForHR(runningObjectTable);
                }
                pprot.Revoke(cookie);
                cookie = 0;
                flag   = true;
            }
            catch (Exception)
            {
                flag = false;
            }
            finally
            {
                if (pprot != null)
                {
                    Marshal.ReleaseComObject(pprot);
                }
                pprot = null;
            }
            return(flag);
        }