internal DesktopRCWData(DesktopGCHeap heap, ulong rcw, IRCWData data) { _addr = rcw; _rcw = data; _heap = heap; _osThreadID = uint.MaxValue; }
internal DesktopRCWData(DesktopGCHeap heap, Address rcw, IRCWData data) { m_addr = rcw; m_rcw = data; m_heap = heap; m_osThreadID = uint.MaxValue; }
public override RcwData GetRCWData(ulong obj) { // Most types can't possibly be RCWs. if (_notRCW) { return(null); } // The dac cannot report this information prior to v4.5. if (DesktopHeap.DesktopRuntime.CLRVersion != DesktopVersion.v45) { _notRCW = true; return(null); } DesktopRCWData result = null; IObjectData data = DesktopHeap.GetObjectData(obj); if (data != null && data.RCW != 0) { IRCWData rcw = DesktopHeap.DesktopRuntime.GetRCWData(data.RCW); if (rcw != null) { result = new DesktopRCWData(DesktopHeap, data.RCW, rcw); } } else if (!_checkedIfIsRCW) // If the first time fails, we assume that all instances of this type can't be RCWs. { _notRCW = true; // TODO FIX NOW review. We really want to simply ask the runtime... } _checkedIfIsRCW = true; return(result); }
public RuntimeCallableWrapper(ClrRuntime runtime, IRCWData data) { if (data is null) { throw new System.ArgumentNullException(nameof(data)); } Address = data.Address; IUnknown = data.IUnknown; VTablePointer = data.VTablePointer; RefCount = data.RefCount; Object = data.ManagedObject; IsDisconnected = data.Disconnected; CreatorThread = runtime?.Threads.FirstOrDefault(t => t.Address == data.CreatorThread); Interfaces = data.GetInterfaces(); }
internal DesktopRCWData(DesktopGCHeap heap, Address rcw, IRCWData data) { _addr = rcw; _rcw = data; _heap = heap; _osThreadID = uint.MaxValue; }