public override CcwData GetCCWData(ulong obj) { if (_notCCW) { return(null); } // The dac cannot report this information prior to v4.5. if (DesktopHeap.DesktopRuntime.CLRVersion != DesktopVersion.v45) { return(null); } DesktopCCWData result = null; IObjectData data = DesktopHeap.GetObjectData(obj); if (data != null && data.CCW != 0) { ICCWData ccw = DesktopHeap.DesktopRuntime.GetCCWData(data.CCW); if (ccw != null) { result = new DesktopCCWData(DesktopHeap, data.CCW, ccw); } } else if (!_checkedIfIsCCW) { _notCCW = true; } _checkedIfIsCCW = true; return(result); }
public override CcwData GetCCWData(Address obj) { if (_notCCW) return null; // The dac cannot report this information prior to v4.5. if (DesktopHeap.DesktopRuntime.CLRVersion != DesktopVersion.v45) return null; DesktopCCWData result = null; IObjectData data = DesktopHeap.GetObjectData(obj); if (data != null && data.CCW != 0) { ICCWData ccw = DesktopHeap.DesktopRuntime.GetCCWData(data.CCW); if (ccw != null) result = new DesktopCCWData(DesktopHeap, data.CCW, ccw); } else if (!_checkedIfIsCCW) { _notCCW = true; } _checkedIfIsCCW = true; return result; }