mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-31 00:06:18 +01:00
Merge branch 'cherry-pick-e42aff25' into 'glib-2-68'
Backport MR !2016 (GIO W32: Pin gio DLL) into glib-2-68 See merge request GNOME/glib!2021
This commit is contained in:
commit
d51c3b01fe
@ -1120,7 +1120,8 @@ void *
|
||||
_g_io_win32_get_module (void)
|
||||
{
|
||||
if (!gio_dll)
|
||||
GetModuleHandleExA (GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS,
|
||||
GetModuleHandleExA (GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
|
||||
GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
|
||||
(const char *) _g_io_win32_get_module,
|
||||
&gio_dll);
|
||||
return gio_dll;
|
||||
|
@ -3964,6 +3964,8 @@ gio_win32_appinfo_init (gboolean do_wait)
|
||||
|
||||
if (g_once_init_enter (&initialized))
|
||||
{
|
||||
HMODULE gio_dll_extra;
|
||||
|
||||
url_associations_key =
|
||||
g_win32_registry_key_new_w (L"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations",
|
||||
NULL);
|
||||
@ -4006,6 +4008,11 @@ gio_win32_appinfo_init (gboolean do_wait)
|
||||
g_atomic_int_set (&gio_win32_appinfo_update_counter, 1);
|
||||
/* Trigger initial tree build. Fake data pointer. */
|
||||
g_thread_pool_push (gio_win32_appinfo_threadpool, (gpointer) keys_updated, NULL);
|
||||
/* Increment the DLL refcount */
|
||||
GetModuleHandleExA (GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_PIN,
|
||||
(const char *) gio_win32_appinfo_init,
|
||||
&gio_dll_extra);
|
||||
/* gio DLL cannot be unloaded now */
|
||||
|
||||
g_once_init_leave (&initialized, TRUE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user