[SHELL32] File Types dialog: Add functionality, optimize loading time (#6122)

- Support loading protocols like XP
- Support most of the relevant EditFlags
- Support reading/writing the AlwaysShowExt and BrowserFlags properties
- Loads the list much faster with optimized code and delaying the large icon and description string
- Reduce the number of magic buffer sizes by replacing them with defines that are in the ballpark of being correct
- Implemented column sorting
- Removed custom icon extraction code
- Removed IDS_FILE_EXT_TYPE string because it must be the same as IDS_ANY_FILE
- Don't touch verb keys that are not edited to retain the original REG type
- Don't clobber unchanged %1 icon location when editing a type

CORE-19756
This commit is contained in:
Whindmar Saksit 2024-10-14 18:03:28 +02:00 committed by GitHub
parent 798ea90784
commit 43d07fe695
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
42 changed files with 824 additions and 700 deletions

View file

@ -23,11 +23,6 @@ SHELL_GetRegCLSID(HKEY hKey, LPCWSTR SubKey, LPCWSTR Value, CLSID &clsid)
return !err ? CLSIDFromString(buf, &clsid) : HRESULT_FROM_WIN32(err);
}
static inline bool RegValueExists(HKEY hKey, LPCWSTR Name)
{
return RegQueryValueExW(hKey, Name, NULL, NULL, NULL, NULL) == ERROR_SUCCESS;
}
static BOOL InsertMenuItemAt(HMENU hMenu, UINT Pos, UINT Flags)
{
MENUITEMINFOW mii;

File diff suppressed because it is too large Load diff

View file

@ -990,10 +990,6 @@ BEGIN
IDS_FILE_TYPES "File Types"
IDS_COLUMN_EXTENSION "Extensions"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s File"
IDS_BYTES_FORMAT "bytes"
IDS_UNKNOWN_APP "Unknown application"
IDS_EXE_DESCRIPTION "Description:"

View file

@ -965,7 +965,7 @@ BEGIN
IDS_SCR_FILE "Screen Saver"
IDS_SYS_FILE "System File"
IDS_VXD_FILE "Virtual Device Driver"
IDS_ANY_FILE "%s-file"
IDS_ANY_FILE "%s File"
IDS_OPEN_VERB "Open"
IDS_EXPLORE_VERB "Explore"
@ -990,10 +990,6 @@ BEGIN
IDS_FILE_TYPES "File Types"
IDS_COLUMN_EXTENSION "Extensions"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s File"
IDS_BYTES_FORMAT "bytes"
IDS_UNKNOWN_APP "Unknown application"
IDS_EXE_DESCRIPTION "Description:"

View file

@ -998,10 +998,6 @@ BEGIN
IDS_FILE_TYPES "Typy souborů"
IDS_COLUMN_EXTENSION "Přípony"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "Soubor %s"
IDS_BYTES_FORMAT "bajtů"
IDS_UNKNOWN_APP "Neznámá aplikace"
IDS_EXE_DESCRIPTION "Popis:"

View file

@ -972,7 +972,7 @@ BEGIN
IDS_SCR_FILE "Screen Saver"
IDS_SYS_FILE "System File"
IDS_VXD_FILE "Virtual Device Driver"
IDS_ANY_FILE "%s-file"
IDS_ANY_FILE "%s File"
IDS_OPEN_VERB "Open"
IDS_EXPLORE_VERB "Explore"
@ -997,10 +997,6 @@ BEGIN
IDS_FILE_TYPES "File Types"
IDS_COLUMN_EXTENSION "Extensions"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s File"
IDS_BYTES_FORMAT "bytes"
IDS_UNKNOWN_APP "Unknown application"
IDS_EXE_DESCRIPTION "Description:"

View file

@ -991,10 +991,6 @@ BEGIN
IDS_FILE_TYPES "Dateitypen"
IDS_COLUMN_EXTENSION "Erweiterungen"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s-Datei"
IDS_BYTES_FORMAT "Bytes"
IDS_UNKNOWN_APP "Unbekannte Anwendung"
IDS_EXE_DESCRIPTION "Beschreibung:"

View file

@ -965,7 +965,7 @@ BEGIN
IDS_SCR_FILE "Screen Saver"
IDS_SYS_FILE "System File"
IDS_VXD_FILE "Virtual Device Driver"
IDS_ANY_FILE "%s-file"
IDS_ANY_FILE "%s File"
IDS_OPEN_VERB "Open"
IDS_EXPLORE_VERB "Explore"
@ -990,10 +990,6 @@ BEGIN
IDS_FILE_TYPES "File Types"
IDS_COLUMN_EXTENSION "Extensions"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s File"
IDS_BYTES_FORMAT "bytes"
IDS_UNKNOWN_APP "Unknown application"
IDS_EXE_DESCRIPTION "Description:"

View file

@ -965,7 +965,7 @@ BEGIN
IDS_SCR_FILE "Screen Saver"
IDS_SYS_FILE "System File"
IDS_VXD_FILE "Virtual Device Driver"
IDS_ANY_FILE "%s-file"
IDS_ANY_FILE "%s File"
IDS_OPEN_VERB "Open"
IDS_EXPLORE_VERB "Explore"
@ -990,10 +990,6 @@ BEGIN
IDS_FILE_TYPES "File Types"
IDS_COLUMN_EXTENSION "Extensions"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s File"
IDS_BYTES_FORMAT "bytes"
IDS_UNKNOWN_APP "Unknown application"
IDS_EXE_DESCRIPTION "Description:"

View file

@ -965,7 +965,7 @@ BEGIN
IDS_SCR_FILE "Screen Saver"
IDS_SYS_FILE "System File"
IDS_VXD_FILE "Virtual Device Driver"
IDS_ANY_FILE "%s-file"
IDS_ANY_FILE "%s File"
IDS_OPEN_VERB "Open"
IDS_EXPLORE_VERB "Explore"
@ -990,10 +990,6 @@ BEGIN
IDS_FILE_TYPES "File Types"
IDS_COLUMN_EXTENSION "Extensions"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s File"
IDS_BYTES_FORMAT "bytes"
IDS_UNKNOWN_APP "Unknown application"
IDS_EXE_DESCRIPTION "Description:"

View file

@ -999,10 +999,6 @@ BEGIN
IDS_FILE_TYPES "Tipos de archivo"
IDS_COLUMN_EXTENSION "Extensiones"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "Archivo %s"
IDS_BYTES_FORMAT "bytes"
IDS_UNKNOWN_APP "Aplicación desconocida"
IDS_EXE_DESCRIPTION "Descripción:"

View file

@ -997,10 +997,6 @@ BEGIN
IDS_FILE_TYPES "Failitüübid"
IDS_COLUMN_EXTENSION "Laiendused"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s Fail"
IDS_BYTES_FORMAT "baiti"
IDS_UNKNOWN_APP "Tundmatu rakendus"
IDS_EXE_DESCRIPTION "Kirjeldus:"

View file

@ -995,10 +995,6 @@ BEGIN
IDS_FILE_TYPES "Fitxategi-mota"
IDS_COLUMN_EXTENSION "Luzapena"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s fitxategi"
IDS_BYTES_FORMAT "bytes"
IDS_UNKNOWN_APP "Aplikazio ezezaguna"
IDS_EXE_DESCRIPTION "Deskribapena:"

View file

@ -965,7 +965,7 @@ BEGIN
IDS_SCR_FILE "Screen Saver"
IDS_SYS_FILE "System File"
IDS_VXD_FILE "Virtual Device Driver"
IDS_ANY_FILE "%s-file"
IDS_ANY_FILE "%s File"
IDS_OPEN_VERB "Open"
IDS_EXPLORE_VERB "Explore"
@ -990,10 +990,6 @@ BEGIN
IDS_FILE_TYPES "File Types"
IDS_COLUMN_EXTENSION "Extensions"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s File"
IDS_BYTES_FORMAT "bytes"
IDS_UNKNOWN_APP "Unknown application"
IDS_EXE_DESCRIPTION "Description:"

View file

@ -990,10 +990,6 @@ BEGIN
IDS_FILE_TYPES "Types de fichiers"
IDS_COLUMN_EXTENSION "Extensions"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "Fichier %s"
IDS_BYTES_FORMAT "octets"
IDS_UNKNOWN_APP "Application inconnue"
IDS_EXE_DESCRIPTION "Description :"

View file

@ -997,10 +997,6 @@ BEGIN
IDS_FILE_TYPES "סוגי קבצים"
IDS_COLUMN_EXTENSION "סיומות"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "קובץ %s"
IDS_BYTES_FORMAT "בתים"
IDS_UNKNOWN_APP "יישום לא ידוע"
IDS_EXE_DESCRIPTION "תיאור:"

View file

@ -992,10 +992,6 @@ BEGIN
IDS_FILE_TYPES "फ़ाइल प्रकारों"
IDS_COLUMN_EXTENSION "एक्सटेंशन"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s फ़ाइल"
IDS_BYTES_FORMAT "बाइट्स"
IDS_UNKNOWN_APP "अनजान ऐप्लिकेशन"
IDS_EXE_DESCRIPTION "विवरण:"

View file

@ -989,10 +989,6 @@ BEGIN
IDS_FILE_TYPES "Fájltípusok"
IDS_COLUMN_EXTENSION "Kiterjesztések"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s fájl"
IDS_BYTES_FORMAT "bájt"
IDS_UNKNOWN_APP "Ismeretlen alkalmazás"
IDS_EXE_DESCRIPTION "Leírás:"

View file

@ -987,10 +987,6 @@ BEGIN
IDS_FILE_TYPES "Jenis Berkas"
IDS_COLUMN_EXTENSION "Ekstensi"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "Berkas %s"
IDS_BYTES_FORMAT "byte"
IDS_UNKNOWN_APP "Aplikasi tidak diketahui"
IDS_EXE_DESCRIPTION "Deskripsi:"

View file

@ -990,10 +990,6 @@ BEGIN
IDS_FILE_TYPES "Tipi di file"
IDS_COLUMN_EXTENSION "Estensioni"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s File"
IDS_BYTES_FORMAT "byte"
IDS_UNKNOWN_APP "Applicazione sconosciuta"
IDS_EXE_DESCRIPTION "Descrizione:"

View file

@ -987,10 +987,6 @@ BEGIN
IDS_FILE_TYPES "ファイルの種類"
IDS_COLUMN_EXTENSION "拡張子"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s ファイル"
IDS_BYTES_FORMAT "バイト"
IDS_UNKNOWN_APP "未知のアプリ"
IDS_EXE_DESCRIPTION "説明:"

View file

@ -972,7 +972,7 @@ BEGIN
IDS_SCR_FILE "Screen Saver"
IDS_SYS_FILE "System File"
IDS_VXD_FILE "Virtual Device Driver"
IDS_ANY_FILE "%s-file"
IDS_ANY_FILE "%s File"
IDS_OPEN_VERB "Open"
IDS_EXPLORE_VERB "Explore"
@ -997,10 +997,6 @@ BEGIN
IDS_FILE_TYPES "File Types"
IDS_COLUMN_EXTENSION "Extensions"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s File"
IDS_BYTES_FORMAT "bytes"
IDS_UNKNOWN_APP "Unknown application"
IDS_EXE_DESCRIPTION "Description:"

View file

@ -965,7 +965,7 @@ BEGIN
IDS_SCR_FILE "Screen Saver"
IDS_SYS_FILE "System File"
IDS_VXD_FILE "Virtual Device Driver"
IDS_ANY_FILE "%s-file"
IDS_ANY_FILE "%s File"
IDS_OPEN_VERB "Open"
IDS_EXPLORE_VERB "Explore"
@ -990,10 +990,6 @@ BEGIN
IDS_FILE_TYPES "File Types"
IDS_COLUMN_EXTENSION "Extensions"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s File"
IDS_BYTES_FORMAT "bytes"
IDS_UNKNOWN_APP "Unknown application"
IDS_EXE_DESCRIPTION "Description:"

View file

@ -965,7 +965,7 @@ BEGIN
IDS_SCR_FILE "Screen Saver"
IDS_SYS_FILE "Systemfil"
IDS_VXD_FILE "Virtuell enhetdriver"
IDS_ANY_FILE "%s-file"
IDS_ANY_FILE "%s fil"
IDS_OPEN_VERB "Åpne"
IDS_EXPLORE_VERB "Explore"
@ -990,10 +990,6 @@ BEGIN
IDS_FILE_TYPES "File Types"
IDS_COLUMN_EXTENSION "Extensions"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s File"
IDS_BYTES_FORMAT "bytes"
IDS_UNKNOWN_APP "Unknown application"
IDS_EXE_DESCRIPTION "Description:"

View file

@ -999,10 +999,6 @@ BEGIN
IDS_FILE_TYPES "Typy plików"
IDS_COLUMN_EXTENSION "Rozszerzenia"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "Plik %s"
IDS_BYTES_FORMAT "bajtów"
IDS_UNKNOWN_APP "Nieznana aplikacja"
IDS_EXE_DESCRIPTION "Opis:"

View file

@ -990,10 +990,6 @@ BEGIN
IDS_FILE_TYPES "File Types"
IDS_COLUMN_EXTENSION "Extensões"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s File"
IDS_BYTES_FORMAT "bytes"
IDS_UNKNOWN_APP "Aplicativo desconhecido"
IDS_EXE_DESCRIPTION "Descrição:"

View file

@ -999,10 +999,6 @@ BEGIN
IDS_FILE_TYPES "Tipos de ficheiro"
IDS_COLUMN_EXTENSION "Extensões"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "Ficheiro %s"
IDS_BYTES_FORMAT "bytes"
IDS_UNKNOWN_APP "Aplicação desconhecida"
IDS_EXE_DESCRIPTION "Descrição:"

View file

@ -998,12 +998,9 @@ BEGIN
IDS_FILE_TYPES "Tipuri"
IDS_COLUMN_EXTENSION "Extensii"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "Fişier %s"
IDS_BYTES_FORMAT "octeţi"
IDS_UNKNOWN_APP "Aplicaţie nespecificată"
IDS_EXE_DESCRIPTION "Descriere:"
IDS_MENU_EMPTY "(Gol)"

View file

@ -999,10 +999,6 @@ BEGIN
IDS_FILE_TYPES "Типы файлов"
IDS_COLUMN_EXTENSION "Расширения"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "Файл %s"
IDS_BYTES_FORMAT "байт"
IDS_UNKNOWN_APP "Неизвестное приложение"
IDS_EXE_DESCRIPTION "Описание:"

View file

@ -965,7 +965,7 @@ BEGIN
IDS_SCR_FILE "Screen Saver"
IDS_SYS_FILE "Systémový súbor"
IDS_VXD_FILE "Ovládač virtuálneho zariadenia"
IDS_ANY_FILE "%s-file"
IDS_ANY_FILE "%s File"
IDS_OPEN_VERB "Otvoriť"
IDS_EXPLORE_VERB "Explore"
@ -990,10 +990,6 @@ BEGIN
IDS_FILE_TYPES "File Types"
IDS_COLUMN_EXTENSION "Extensions"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s File"
IDS_BYTES_FORMAT "bytes"
IDS_UNKNOWN_APP "Unknown application"
IDS_EXE_DESCRIPTION "Description:"

View file

@ -965,7 +965,7 @@ BEGIN
IDS_SCR_FILE "Screen Saver"
IDS_SYS_FILE "System File"
IDS_VXD_FILE "Virtual Device Driver"
IDS_ANY_FILE "%s-file"
IDS_ANY_FILE "%s File"
IDS_OPEN_VERB "Open"
IDS_EXPLORE_VERB "Explore"
@ -990,10 +990,6 @@ BEGIN
IDS_FILE_TYPES "File Types"
IDS_COLUMN_EXTENSION "Extensions"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s File"
IDS_BYTES_FORMAT "bytes"
IDS_UNKNOWN_APP "Unknown application"
IDS_EXE_DESCRIPTION "Description:"

View file

@ -997,10 +997,6 @@ BEGIN
IDS_FILE_TYPES "TipiDokumentit"
IDS_COLUMN_EXTENSION "Prapashtesa"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s File"
IDS_BYTES_FORMAT "bytes"
IDS_UNKNOWN_APP "Aplikacion panjohur"
IDS_EXE_DESCRIPTION "Përshkrimi:"

View file

@ -965,7 +965,7 @@ BEGIN
IDS_SCR_FILE "Skärmsläckare"
IDS_SYS_FILE "Systemfil"
IDS_VXD_FILE "Virtuell enhetsdrivruting"
IDS_ANY_FILE "%s-file"
IDS_ANY_FILE "%s-fil"
IDS_OPEN_VERB "Öppna"
IDS_EXPLORE_VERB "Utforska"
@ -990,10 +990,6 @@ BEGIN
IDS_FILE_TYPES "Filtyper"
IDS_COLUMN_EXTENSION "Filändelse"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s-fil"
IDS_BYTES_FORMAT "byte"
IDS_UNKNOWN_APP "Okänt program"
IDS_EXE_DESCRIPTION "Beskrivning:"

View file

@ -999,10 +999,6 @@ BEGIN
IDS_FILE_TYPES "Dosya Türleri"
IDS_COLUMN_EXTENSION "Uzantılar"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s Dosyası"
IDS_BYTES_FORMAT "bit"
IDS_UNKNOWN_APP "Bilinmeyen Uygulama"
IDS_EXE_DESCRIPTION "Tanım:"

View file

@ -990,10 +990,6 @@ BEGIN
IDS_FILE_TYPES "Типи Файлів"
IDS_COLUMN_EXTENSION "Розширення"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "Файл %s"
IDS_BYTES_FORMAT "байт"
IDS_UNKNOWN_APP "Невідома програма"
IDS_EXE_DESCRIPTION "Опис:"

View file

@ -1000,10 +1000,6 @@ BEGIN
IDS_FILE_TYPES "文件类型"
IDS_COLUMN_EXTENSION "扩展名"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s 文件"
IDS_BYTES_FORMAT "字节"
IDS_UNKNOWN_APP "未知应用程序"
IDS_EXE_DESCRIPTION "描述:"

View file

@ -998,10 +998,6 @@ BEGIN
IDS_FILE_TYPES "檔案類型"
IDS_COLUMN_EXTENSION "副檔名"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s 檔案"
IDS_BYTES_FORMAT "位元組"
IDS_UNKNOWN_APP "不明應用程式"
IDS_EXE_DESCRIPTION "描述:"

View file

@ -999,10 +999,6 @@ BEGIN
IDS_FILE_TYPES "檔案類型"
IDS_COLUMN_EXTENSION "副檔名"
/* As in 'INI File' or 'WAV File', fallback string for no-name extensions
used in the _File type_ tab of the _Folder Options_ dialog */
IDS_FILE_EXT_TYPE "%s 檔案"
IDS_BYTES_FORMAT "位元組"
IDS_UNKNOWN_APP "未知應用程式"
IDS_EXE_DESCRIPTION "描述:"

View file

@ -111,6 +111,7 @@
#include "CUserNotification.h"
#include "dialogs/folder_options.h"
#include "shelldesktop/CChangeNotifyServer.h"
#include "utils.h"
#include <wine/debug.h>
#include <wine/unicode.h>

View file

@ -188,7 +188,6 @@
#define IDS_FILE_TYPES 174
#define IDS_FILE_DETAILS 175
#define IDS_FILE_DETAILSADV 176
#define IDS_FILE_EXT_TYPE 999
#define IDS_BYTES_FORMAT 177
#define IDS_OPEN_WITH_RECOMMENDED 178
#define IDS_OPEN_WITH_OTHER 179

47
dll/win32/shell32/utils.h Normal file
View file

@ -0,0 +1,47 @@
/*
* PROJECT: shell32
* LICENSE: LGPL-2.1+ (https://spdx.org/licenses/LGPL-2.1+)
* PURPOSE: Utility functions
* COPYRIGHT: ReactOS Team
*/
#pragma once
inline BOOL
RegValueExists(HKEY hKey, LPCWSTR Name)
{
return RegQueryValueExW(hKey, Name, NULL, NULL, NULL, NULL) == ERROR_SUCCESS;
}
inline BOOL
RegKeyExists(HKEY hKey, LPCWSTR Path)
{
BOOL ret = !RegOpenKeyExW(hKey, Path, 0, MAXIMUM_ALLOWED, &hKey);
if (ret)
RegCloseKey(hKey);
return ret;
}
inline DWORD
RegSetOrDelete(HKEY hKey, LPCWSTR Name, DWORD Type, LPCVOID Data, DWORD Size)
{
if (Data)
return RegSetValueExW(hKey, Name, 0, Type, LPBYTE(Data), Size);
else
return RegDeleteValueW(hKey, Name);
}
inline DWORD
RegSetString(HKEY hKey, LPCWSTR Name, LPCWSTR Str, DWORD Type = REG_SZ)
{
return RegSetValueExW(hKey, Name, 0, Type, LPBYTE(Str), (lstrlenW(Str) + 1) * sizeof(WCHAR));
}
// SHExtractIconsW is a forward, use this function instead inside shell32
inline HICON
SHELL32_SHExtractIcon(LPCWSTR File, int Index, int cx, int cy)
{
HICON hIco;
int r = PrivateExtractIconsW(File, Index, cx, cy, &hIco, NULL, 1, 0);
return r > 0 ? hIco : NULL;
}

View file

@ -644,6 +644,32 @@ typedef enum
ASSOCENUM_NONE
} ASSOCENUM;
typedef enum
{
FTA_None = 0x00000000,
FTA_Exclude = 0x00000001,
FTA_Show = 0x00000002,
FTA_HasExtension = 0x00000004,
FTA_NoEdit = 0x00000008,
FTA_NoRemove = 0x00000010,
FTA_NoNewVerb = 0x00000020,
FTA_NoEditVerb = 0x00000040,
FTA_NoRemoveVerb = 0x00000080,
FTA_NoEditDesc = 0x00000100,
FTA_NoEditIcon = 0x00000200,
FTA_NoEditDflt = 0x00000400,
FTA_NoEditVerbCmd = 0x00000800,
FTA_NoEditVerbExe = 0x00001000,
FTA_NoDDE = 0x00002000,
FTA_NoEditMIME = 0x00008000,
FTA_OpenIsSafe = 0x00010000,
FTA_AlwaysUnsafe = 0x00020000,
FTA_NoRecentDocs = 0x00100000,
FTA_SafeForElevation = 0x00200000, /* Win8+ */
FTA_AlwaysUseDirectInvoke = 0x00400000 /* Win8+ */
} FILETYPEATTRIBUTEFLAGS;
DEFINE_ENUM_FLAG_OPERATORS(FILETYPEATTRIBUTEFLAGS)
typedef struct IQueryAssociations *LPQUERYASSOCIATIONS;
#define INTERFACE IQueryAssociations