コード例 #1
0
ファイル: LegacyRuntime.cs プロジェクト: timhe/clrmd
        public override IEnumerable <ClrHandle> EnumerateHandles()
        {
            HandleTableWalker handleTable = new HandleTableWalker(this);

            byte[] input = null;
            if (CLRVersion == DesktopVersion.v2)
            {
                input = handleTable.V2Request;
            }
            else
            {
                input = handleTable.V4Request;
            }

            // TODO:  Better to return partial data or null?  Maybe bool function return?
            //        I don't even think the dac api will fail unless there's a data read error.
            bool ret = Request(DacRequests.HANDLETABLE_TRAVERSE, input, null);

            if (!ret)
            {
                Trace.WriteLine("Warning, GetHandles() method failed, returning partial results.");
            }

            return(handleTable.Handles);
        }
コード例 #2
0
ファイル: legacyruntime.cs プロジェクト: mwatts/clrmd
        public override IEnumerable<ClrHandle> EnumerateHandles()
        {
            HandleTableWalker handleTable = new HandleTableWalker(this);

            byte[] input = null;
            if (CLRVersion == DesktopVersion.v2)
                input = handleTable.V2Request;
            else
                input = handleTable.V4Request;

            // TODO:  Better to return partial data or null?  Maybe bool function return?
            //        I don't even think the dac api will fail unless there's a data read error.
            var ret = Request(DacRequests.HANDLETABLE_TRAVERSE, input, null);
            if (!ret)
                Trace.WriteLine("Warning, GetHandles() method failed, returning partial results.");

            return handleTable.Handles;
        }