Marco, If you could do such a thing as ask the component manager for a list of all components that implemented a specific interface and the component manager returned a list of ten or twelve or even just two components: what would you have your program do with the information? As to just what interfaces a component implements (ie. what "contract" the component claims to be bound to ) is normally communicated through the documentation for the component which developers need to read to be able to use the component anyway. Some flavors of COM do support grouping components into categories (thereby implying that a minimum set of interfaces are supported) but that's a higher level abstraction than just listing what interfaces are implemented. Regards, Rick Marco Bosch wrote: > Hello, > > I've been wondering why in XPCOM you do not register the interfaces. If > you've got an implementation, you register your ClassID, classname and > contractID. However, you do not register the interfaces. Therefor, you > cannot ask XPCOM to find an implementation for a particular interface. You > have to `know' that there is an implementation, use the contractID or > ClassID of that implementation to query the class if it really implements > the interface. > > This sounds quit complicated to me. Why not just register the > interfaces?.... > It's not like there are a million interfaces in one class. In general, a > class only > contains a very small number of interfaces (typically 1?) > > There must be a good reason for this. I hope it's not something like: > `COM does it too...' > > Greetings, > > Marco Bosch > > Btw: > There are two implementations in Mozilla that implement incorrect > contractIDs: > "@mozilla.org/layout/htmlCopyEncoder" doen't contain a version, like > ";1" > "component://netscape/messenger/movemailservice" doesn't look like a > contractID.
