title: How to find all instances of types that implement a given interface during debugging
body: <p>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. <code>!dumpheap</code> is of little help here.</p>
  
  <p>However, <code>!dumpmt -md</code> on a given MT lists the number of <code>IFaces</code> in <code>IFaceMap</code>. As far as I can tell this number seems to indicate if the type implements one or more interfaces or not.  When using the <code>-md</code> flag methods on the type are also listed. </p>
  
  <p>Unfortunately the <code>!dumpmd</code> doesn't tie a given method to an interface as far as I can tell, so this cannot be used to establish the implemented interfaces. </p>
  
  <p>I assume this information is available somewhere in memory, but I am not sure where to look. Any input is highly appreciated. </p>