rv = aCompMgr->RegisterComponentSpec(*cp->mCID, cp->mDescription, cp->mContractID, aPath, PR_TRUE,
rv = aCompMgr->RegisterComponentSpec(cp->info.mCID, cp->info.mDescription, cp->info.mContractID, aPath, PR_TRUE,
nsUConvModule::RegisterSelf(nsIComponentManager *aCompMgr,                            nsIFile* aPath,                            const char* registryLocation,                            const char* componentType){  nsresult rv = NS_OK;  char * cid_string;                                                              char buff[1024];   nsIRegistry * registry = NULL;  nsRegistryKey key;                                                            #ifdef DEBUG  printf("*** Registering uconv components\n");#endif   // get the registry                                                             rv = nsServiceManager::GetService(NS_REGISTRY_CONTRACTID,       NS_GET_IID(nsIRegistry), (nsISupports**)&registry);                         if (NS_FAILED(rv))       return rv;  // open the registry                                                            rv = registry->OpenWellKnownRegistry(nsIRegistry::ApplicationComponentRegistry);                                 if (NS_FAILED(rv))     return rv;  Components* cp = gComponents;  Components* end = cp + NUM_COMPONENTS;  while (cp < end) {    rv = aCompMgr->RegisterComponentSpec(*cp->mCID, cp->mDescription,                                         cp->mContractID, aPath, PR_TRUE,                                         PR_TRUE);    if (NS_FAILED(rv)) {#ifdef DEBUG      printf("nsUConvModule: unable to register %s component => %x\n",             cp->mDescription, rv);#endif      break;    }    // register Unicode converter component info here.    if (NULL != cp->mCharsetSrc) {      cid_string = cp->mCID->ToString();                                   sprintf(buff, "%s/%s", "software/netscape/intl/uconv", cid_string);               nsCRT::free(cid_string);                                                          rv = registry -> AddSubtree(nsIRegistry::Common, buff, &key);                    if (NS_FAILED(rv))        break;      rv = registry -> SetStringUTF8(key, "source", cp->mCharsetSrc);      if (NS_FAILED(rv))         break;      rv = registry -> SetStringUTF8(key, "destination", cp->mCharsetDest);      if (NS_FAILED(rv))         break;    }    cp++;  }  if (registry != NULL) {                                                           nsServiceManager::ReleaseService(NS_REGISTRY_CONTRACTID, registry);           }  else  {#ifdef DEBUG      printf("nsUConvModule: unable to register %s component => %x\n",             cp->mDescription, rv);#endif  }  // XXX also unregister this stuff when time comes  rv = NS_RegisterConverterManagerData();  return rv;}