rv = NS_NewGenericFactory(getter_AddRefs(mMailDBFactory), &nsMailDatabaseConstructor);
rv = NS_NewGenericFactory(getter_AddRefs(mMailDBFactory), &MailDbInfo);
NS_IMETHODIMP nsMsgDBModule::GetClassObject(nsIComponentManager *aCompMgr,                               const nsCID& aClass,                               const nsIID& aIID,                               void** r_classObj){    nsresult rv = NS_OK;    // Defensive programming: Initialize *r_classObj in case of error below    if (!r_classObj)        return NS_ERROR_INVALID_POINTER;    *r_classObj = NULL;    // Do one-time-only initialization if necessary    if (!mInitialized)     {        rv = Initialize();        if (NS_FAILED(rv)) // Initialization failed! yikes!            return rv;    }    // Choose the appropriate factory, based on the desired instance    // class type (aClass).    nsCOMPtr<nsIGenericFactory> fact;    if (aClass.Equals(kCMailDB))    {        if (!mMailDBFactory)            rv = NS_NewGenericFactory(getter_AddRefs(mMailDBFactory), &nsMailDatabaseConstructor);        fact = mMailDBFactory;    }    else if (aClass.Equals(kCNewsDB))    {        if (!mNewsDBFactory)            rv = NS_NewGenericFactory(getter_AddRefs(mNewsDBFactory), &nsNewsDatabaseConstructor);        fact = mNewsDBFactory;    }    else if (aClass.Equals(kCImapDB))    {        if (!mImapDBFactory)            rv = NS_NewGenericFactory(getter_AddRefs(mImapDBFactory), &nsImapMailDatabaseConstructor);        fact = mImapDBFactory;    }    else if (aClass.Equals(kCMsgRetentionSettings))    {      if (!mMsgRetentionSettingsFactory)        rv = NS_NewGenericFactory(getter_AddRefs(mMsgRetentionSettingsFactory), &nsMsgRetentionSettingsConstructor);      fact = mMsgRetentionSettingsFactory;    }    if (fact)        rv = fact->QueryInterface(aIID, r_classObj);    return rv;}