Just thought I'd add, in JS you can also:

if ( O1 instanceof Components.interfaces.O2 )   {
        // Do stuff
}

O1 is implicity cast on success


N



John Bandhauer wrote:
Oliveiros Cristina wrote:
All,

Can anyone advise me if the identity rules that applied in MSCOM apply as well in XPCOM? Namely, if we query a certain object O1 for nsISupports interface and store pointer in p1 and query O2 for nsISupports and store pointer in p2

If O1 == O2  implies that p1 == p2   ?

Yes.


If this rule doesn't hold how can we test if two interface pointers refer to the same component ?

Thanks in advance for your help

Oliveiros Cristina
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to