In article <9ae24v$[EMAIL PROTECTED]>, [EMAIL PROTECTED] says...
> I want to replace that class with my own implementation of nsFoo ( the IID
> and CID will stay the same, the interface will be the same ), and
> place this implemetation in a dll ( DLL2 ) for my embedded browser. I do
> this by copying the nsFoo.cpp into my embedded/browser/... and modifying
> that code to suit my needs. I want that each time the mozilla will want to
> create an instance of the class nsFoo, my own implemetation of nsFoo will be
> used and not the standard one.
I think the best you could do is create your own implementation of nsFoo,
then register it in XPCOM, overwriting a previous regstration
See nsComponentManager::RegisterComponent()
The last two arguments of this API tells should existing registration being
overwritten and should registration remain permanent.
The errors you get are probably due to missing interfaces. Perhaps mozilla
queries for some interface, that is not supported in your implementation.
This usualy will cause an assert fail in debug build or crash in release
Hope this helps
--
--
Regards,
Waleri