nsresult GetExtensionFromWindowsMimeDatabase(const char * aMimeType, nsCString& aFileExtension)
static nsresult GetExtensionFromWindowsMimeDatabase(const char * aMimeType, nsCString& aFileExtension)
nsresult GetExtensionFromWindowsMimeDatabase(const char * aMimeType, nsCString& aFileExtension){   HKEY hKey;   nsCAutoString mimeDatabaseKey ("MIME\\Database\\Content Type\\");   mimeDatabaseKey += aMimeType;      LONG err = ::RegOpenKeyEx( HKEY_CLASSES_ROOT, mimeDatabaseKey.get(), 0, KEY_QUERY_VALUE, &hKey);   if (err == ERROR_SUCCESS)   {      LPBYTE pBytes = GetValueBytes( hKey, "Extension");      if (pBytes)      {         aFileExtension = (char * )pBytes;      }      delete pBytes;      ::RegCloseKey(hKey);   }   return NS_OK;}