If you inspect an interface pointer in Delphi's Evaluate/Modify pop-up (Ctrl-F7) it will say something resembling this:
Pointer($656E84) as IConnectionPoint
My question is, where does the debugger get the "as IConnectionPoint" or whatever from, iow
a) How does it know what type of interface the pointer is referencing; and
b) Where (and by what process) does the debugger get the text of its description, e.g. IConnectionPoint?
I was wondering whether the debugger manages these things by somehow querying the interface the pointer is holding. But, IInterface (which is what the debugger reports an IUnknown as) only has QueryInterface, _AddRef and _Release methods and I can't seehow the info could be obtained from any of those. Equally, I can't see how the debugger could derive the info from the "history" of the pointer, because the object its referencing need not have been created in the Delphi app in the first place.



