nsresult GetExtensionFrom4xRegistryInfo(const char * aMimeType, nsCString& aFileExtension)
static nsresult GetExtensionFrom4xRegistryInfo(const char * aMimeType, nsCString& aFileExtension)
nsresult GetExtensionFrom4xRegistryInfo(const char * aMimeType, nsCString& aFileExtension){   nsCAutoString command ("Software\\Netscape\\Netscape Navigator\\Suffixes");   nsresult rv = NS_OK;   HKEY hKey;   LONG err = ::RegOpenKeyEx( HKEY_CURRENT_USER, command.get(), 0, KEY_QUERY_VALUE, &hKey);   if (err == ERROR_SUCCESS)   {      LPBYTE pBytes = GetValueBytes( hKey, aMimeType);      if (pBytes) // only try to get the extension if we have a value!      {        aFileExtension = ".";        aFileExtension.Append( (char *) pBytes);              // this may be a comma separate list of extensions...just take the first one        // for now...        PRInt32 pos = aFileExtension.FindChar(',');        if (pos > 0) // we have a comma separated list of languages...          aFileExtension.Truncate(pos); // truncate everything after the first comma (including the comma)      }         delete [] pBytes;      // close the key      ::RegCloseKey(hKey);   }   else     rv = NS_ERROR_FAILURE; // no 4.x extension mapping found!   return rv;}