Пример #1
0
 void disposeCOMInterfaces() {
   if (supports != null) {
     supports.dispose();
     supports = null;
   }
   if (promptAuth != null) {
     promptAuth.dispose();
     promptAuth = null;
   }
 }
Пример #2
0
  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;
  }
Пример #3
0
 long /*int*/ getAddress() {
   return promptAuth.getAddress();
 }