factory = NEW_JA_NATIVEDETECTOR_FACTORY();
;
extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* aServMgr,                                           const nsCID &aClass,                                           const char *aClassName,                                           const char *aProgID,                                           nsIFactory **aFactory){  if (aFactory == NULL) {    return NS_ERROR_NULL_POINTER;  }  nsIFactory *factory = nsnull;  if (aClass.Equals(kJANativeDetectorCID)) {    factory = NEW_JA_NATIVEDETECTOR_FACTORY();  } else if (aClass.Equals(kJANativeStringDetectorCID)) {    factory = NEW_JA_STRING_NATIVEDETECTOR_FACTORY();  } else if (aClass.Equals(kKONativeDetectorCID)) {    factory = NEW_KO_NATIVEDETECTOR_FACTORY();  } else if (aClass.Equals(kKONativeStringDetectorCID)) {    factory = NEW_KO_STRING_NATIVEDETECTOR_FACTORY();  }  if(nsnull != factory) {    nsresult res = factory->QueryInterface(kFactoryIID, (void **) aFactory);    if (NS_FAILED(res)) {      *aFactory = NULL;      delete factory;    }    return res;  }  return NS_NOINTERFACE;}