nsWalletViewerFactory::QueryInterface(const nsIID &aIID, void **aResult) { if (aResult == NULL) { return NS_ERROR_NULL_POINTER; }   *aResult = NULL;  if (aIID.Equals(kISupportsIID)) { *aResult = (void *)(nsISupports*)this; } else if (aIID.Equals(kIFactoryIID)) { *aResult = (void *)(nsIFactory*)this; }  if (*aResult == NULL) { return NS_NOINTERFACE; }  AddRef(); return NS_OK; }
NS_IMPL_ISUPPORTS(nsWalletViewerModule, NS_GET_IID(nsIModule))
nsWalletViewerFactory::QueryInterface(const nsIID &aIID, void **aResult)   {     if (aResult == NULL) {       return NS_ERROR_NULL_POINTER;     }     // Always NULL result, in case of failure     *aResult = NULL;     if (aIID.Equals(kISupportsIID)) {       *aResult = (void *)(nsISupports*)this;     } else if (aIID.Equals(kIFactoryIID)) {       *aResult = (void *)(nsIFactory*)this;     }     if (*aResult == NULL) {       return NS_NOINTERFACE;     }     AddRef(); // Increase reference count for caller     return NS_OK;   }   