nsXULKeyListenerImpl::QueryInterface(REFNSIID iid, void** result) { if (! result) return NS_ERROR_NULL_POINTER;  *result = nsnull; if (iid.Equals(nsIXULKeyListener::GetIID()) || iid.Equals(kISupportsIID)) { *result = NS_STATIC_CAST(nsIXULKeyListener*, this); NS_ADDREF_THIS(); return NS_OK; } else if (iid.Equals(nsIDOMKeyListener::GetIID())) { *result = NS_STATIC_CAST(nsIDOMKeyListener*, this); NS_ADDREF_THIS(); return NS_OK; } else if (iid.Equals(kIDomEventListenerIID)) { *result = (nsIDOMEventListener*)(nsIDOMMouseListener*)this; NS_ADDREF_THIS(); return NS_OK; }  return NS_NOINTERFACE; }
NS_IMPL_ISUPPORTS(nsProxyStream, nsIInputStream::GetIID());
nsXULKeyListenerImpl::QueryInterface(REFNSIID iid, void** result){    if (! result)        return NS_ERROR_NULL_POINTER;    *result = nsnull;    if (iid.Equals(nsIXULKeyListener::GetIID()) ||        iid.Equals(kISupportsIID)) {        *result = NS_STATIC_CAST(nsIXULKeyListener*, this);        NS_ADDREF_THIS();        return NS_OK;    }    else if (iid.Equals(nsIDOMKeyListener::GetIID())) {        *result = NS_STATIC_CAST(nsIDOMKeyListener*, this);        NS_ADDREF_THIS();        return NS_OK;    }    else if (iid.Equals(kIDomEventListenerIID)) {        *result = (nsIDOMEventListener*)(nsIDOMMouseListener*)this;        NS_ADDREF_THIS();        return NS_OK;    }    return NS_NOINTERFACE;}