int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) {
    if (riid == 0 || ppvObject == 0) return XPCOM.NS_ERROR_NO_INTERFACE;
    nsID guid = new nsID();
    XPCOM.memmove(guid, riid, nsID.sizeof);

    if (guid.Equals(nsISupports.NS_ISUPPORTS_IID)) {
      XPCOM.memmove(ppvObject, new long /*int*/[] {supports.getAddress()}, C.PTR_SIZEOF);
      AddRef();
      return XPCOM.NS_OK;
    }
    if (guid.Equals(XPCOM.NS_IAUTHPROMPT2_IID)) {
      XPCOM.memmove(ppvObject, new long /*int*/[] {promptAuth.getAddress()}, C.PTR_SIZEOF);
      AddRef();
      return XPCOM.NS_OK;
    }

    XPCOM.memmove(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF);
    return XPCOM.NS_ERROR_NO_INTERFACE;
  }
 long /*int*/ getAddress() {
   return promptAuth.getAddress();
 }