GWin32RegistryKey: add MUI capabilities to get_value()

An extra argument to g_win32_registry_key_get_value_w() and
g_win32_registry_key_get_value() indicates that RegLoadMUIStringW()
should be used instead of RegQueryValueExW(). It only works on
strings, and automatically resolves resource strings (the ones
that start with "@").

The extra argument is needed to find resource DLLs that are only
specified by their relative name.
This commit is contained in:
Руслан Ижбулатов
2020-01-26 23:28:19 +00:00
parent e816e9c86f
commit a22a15dc5a
4 changed files with 334 additions and 18 deletions

View File

@@ -239,8 +239,9 @@ gboolean g_win32_registry_value_iter_get_data_w (GWin32RegistryValu
gsize *value_data_size,
GError **error);
GLIB_AVAILABLE_IN_2_46
GLIB_AVAILABLE_IN_2_66
gboolean g_win32_registry_key_get_value (GWin32RegistryKey *key,
const gchar * const *mui_dll_dirs,
gboolean auto_expand,
const gchar *value_name,
GWin32RegistryValueType *value_type,
@@ -248,8 +249,9 @@ gboolean g_win32_registry_key_get_value (GWin32RegistryKey
gsize *value_data_size,
GError **error);
GLIB_AVAILABLE_IN_2_46
GLIB_AVAILABLE_IN_2_66
gboolean g_win32_registry_key_get_value_w (GWin32RegistryKey *key,
const gunichar2 * const *mui_dll_dirs,
gboolean auto_expand,
const gunichar2 *value_name,
GWin32RegistryValueType *value_type,
@@ -276,6 +278,12 @@ gboolean g_win32_registry_key_has_changed (GWin32RegistryKey
GLIB_AVAILABLE_IN_2_46
void g_win32_registry_key_erase_change_indicator (GWin32RegistryKey *key);
GLIB_AVAILABLE_IN_2_66
const gunichar2 * const *g_win32_registry_get_os_dirs_w (void);
GLIB_AVAILABLE_IN_2_66
const gchar * const *g_win32_registry_get_os_dirs (void);
G_END_DECLS
#endif /* G_PLATFORM_WIN32 */