How to find all instances of types that implement a given interface during debugging
问题 I am looking for a way to locate all current instances on the heap of types that implement a given interface (during WinDbg debugging that is). As interfaces are not types in the sense that you can create instances of an interface, they obviously do not show up when inspecting the heap. I.e. !dumpheap is of little help here. However, !dumpmt -md on a given MT lists the number of IFaces in IFaceMap . As far as I can tell this number seems to indicate if the type implements one or more