I am implementing something in COM where I new up some objects (FilterGraph IFilters in this case) and each time I new up another, I'd like to iterate over the previous list and see if the one I'm about to add is "already on the graph" (already in the list). My first thought was to just use pointer equality (didn't work). Then I thought to compare by CLSID.
Is there a way to get the CLSID from an "arbitrary" COM object?
Closest I could find was: newing up guid's from the display name's substring
Problems accessing the Running Object Table
and what is CLSID of COM object I just ran in Visual Basic (which uses CreateObject however I'm using an EnumMoniker not CreateObject).
(as a note, I've discovered IBaseFilter/IMediaFilter's parent class IPersist has a GetClassID method I can use, but for the sake of curiosity, is there a more generic way...)