NS_IMPL_HTML_CONTENT_QUERY_INTERFACE(aIID, aInstancePtr, this) if (aIID.Equals(kIFormIID)) { *aInstancePtr = (void*)(nsIForm*)this;
if (NULL == aInstancePtr) { return NS_ERROR_NULL_POINTER; } static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); static NS_DEFINE_IID(kIDOMHTMLCollectionIID, NS_IDOMHTMLCOLLECTION_IID); static NS_DEFINE_IID(kIScriptObjectOwnerIID, NS_ISCRIPTOBJECTOWNER_IID); if (aIID.Equals(kIDOMHTMLCollectionIID)) { *aInstancePtr = (void*)(nsIDOMHTMLCollection*)this;
nsHTMLFormElement::QueryInterface(REFNSIID aIID, void** aInstancePtr){  NS_IMPL_HTML_CONTENT_QUERY_INTERFACE(aIID, aInstancePtr, this)  if (aIID.Equals(kIFormIID)) {    *aInstancePtr = (void*)(nsIForm*)this;    AddRef();    return NS_OK;  }   else if (aIID.Equals(kIDOMHTMLFormElementIID)) {    *aInstancePtr = (void*)(nsIDOMHTMLFormElement*)this;    AddRef();    return NS_OK;  }   else if (aIID.Equals(kIDOMNSHTMLFormElementIID)) {    *aInstancePtr = (void*)(nsIDOMNSHTMLFormElement*)this;    AddRef();    return NS_OK;  }  return NS_NOINTERFACE;}