Yvan Altmann wrote:
Hi,
Being new to XPCOM, I was wondering if it is possible to "overwrite" the implementation of a component, replacing it with another class of same interface. The idea would be to replace the component which implements nsIIOService using one of my own.

Thanks in advance,
YA
Yes. Implement the same interfaces and register the component under the same contract ID. This assumes that the client program references the component by contract ID (a text string) and not class ID (a 128 bit number). Duplicating class-ids is "a bad thing" (TM).

If the client program requests the component by class id then you're stuck. Of course, this is mozilla so you've probably got the source and can hack away to make things work.

-rick




Reply via email to