file->GetPath(dllName);
file->GetNativePath(dllName);
cidToDllname(nsIComponentManager* aComponentManager, nsIRegistry* aRegistry,             const nsACString &aCID, nsACString &dllName){  // To figure out the filename of the plugin, we'll need to get the  // plugin's CID, and then navigate through the XPCOM registry to  // pull out the DLL name to which the CID is registered.  nsAutoString path(NS_LITERAL_STRING("software/mozilla/XPCOM/classID/") + NS_ConvertASCIItoUCS2(aCID));  nsRegistryKey cidKey;  nsresult rv = aRegistry->GetKey(nsIRegistry::Common, path.get(), &cidKey);  if (NS_SUCCEEDED(rv)) {    PRUint8* library;    PRUint32 count;    // XXX Good grief, what does "GetBytesUTF8()" mean? They're bytes!    rv = aRegistry->GetBytesUTF8(cidKey, "InprocServer", &count, &library);    if (NS_SUCCEEDED(rv)) {      nsCOMPtr<nsIFile> file;      // what I want to do here is QI for a Component Registration Manager.  Since this       // has not been invented yet, QI to the obsolete manager.  Kids, don't do this at home.      nsCOMPtr<nsIComponentManagerObsolete> obsoleteManager = do_QueryInterface(aComponentManager, &rv);      if (obsoleteManager)        rv = obsoleteManager->SpecForRegistryLocation(NS_REINTERPRET_CAST(const char*, library),                                                      getter_AddRefs(file));      if (NS_SUCCEEDED(rv)) {        file->GetPath(dllName);      }      nsCRT::free(NS_REINTERPRET_CAST(char*, library));    }  }  return rv;}