rv = compMgr->RegisterComponent(kAddressBookDB, nsnull, nsnull, path, PR_TRUE, PR_TRUE); if (NS_FAILED(rv))finalResult = rv;
NSRegisterSelf(nsISupports* aServMgr, const char* path){	nsresult rv = NS_OK;	nsresult finalResult = NS_OK;	nsCOMPtr<nsIServiceManager> servMgr(do_QueryInterface(aServMgr, &rv));	if (NS_FAILED(rv)) return rv;	NS_WITH_SERVICE1(nsIComponentManager, compMgr, aServMgr, kComponentManagerCID, &rv);	if (NS_FAILED(rv)) return rv;	// register our RDF datasources:	rv = compMgr->RegisterComponent(kAbDirectoryDataSourceCID, 							  "Mail/News Address Book Directory Data Source",							  NS_RDF_DATASOURCE_PROGID_PREFIX "addressdirectory",							  path, PR_TRUE, PR_TRUE);	if (NS_FAILED(rv)) finalResult = rv;	rv = compMgr->RegisterComponent(kAbDirectoryCID,								  "Mail/News Address Book Directory Factory",								  NS_RDF_RESOURCE_FACTORY_PROGID_PREFIX "abdirectory",								  path, PR_TRUE, PR_TRUE);	if (NS_FAILED(rv)) finalResult = rv;	rv = compMgr->RegisterComponent(kAbCardDataSourceCID, 							  "Mail/News Address Book Card Data Source",							  NS_RDF_DATASOURCE_PROGID_PREFIX "addresscard",							  path, PR_TRUE, PR_TRUE);	if (NS_FAILED(rv)) finalResult = rv;	rv = compMgr->RegisterComponent(kAbCardCID,								  "Mail/News Address Book Card Factory",								  NS_RDF_RESOURCE_FACTORY_PROGID_PREFIX "abcard",								  path, PR_TRUE, PR_TRUE);	if (NS_FAILED(rv)) finalResult = rv;		return finalResult;}