Christian Biesinger wrote:The GetInterfaces implementation of GenericFactory looks into its moduleinfo structure for a getinterfaces pointer. However, very few components really implement nsIClassInfo, and thus this pointer is null, and hence this function does what it does.
That is too bad :-(
So the alternative to this would be to QueryInterface every component to every known interface, right? IIUC that is what the XPCOM Component Viewer[1] does/did. I just hoped there would be a cleaner way to accomplish this.
Classinfo is mainly used by xpconnect so that it can "predictively" flatten the interfaces on an object. Thus, the vast majority of XPCOM components don't implement classinfo.
I guess I'm wondering *why* you want to enumerate the interfaces that every component supports. Is it curiosity or is it meant to actually accomplish something? Note that it is not a good way to figure out all of the XPCOM objects that might be floating around, because some/many objects are not available directly from XPCOM through factories, but are only available through "getter" functions on other objects.
--BDS _______________________________________________ Mozilla-xpcom mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-xpcom
