mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 22:52:09 +01:00
gmodule: Don't try to use toolhelp for symbol searching on UWP
This is not allowed under UWP.
This commit is contained in:
parent
f84ef02914
commit
2e2558b313
@ -127,8 +127,11 @@ find_in_any_module_using_toolhelp (const gchar *symbol_name)
|
|||||||
HANDLE snapshot;
|
HANDLE snapshot;
|
||||||
MODULEENTRY32 me32;
|
MODULEENTRY32 me32;
|
||||||
|
|
||||||
gpointer p;
|
gpointer p = NULL;
|
||||||
|
|
||||||
|
/* Under UWP, Module32Next and Module32First are not available since we're
|
||||||
|
* not allowed to search in the address space of arbitrary loaded DLLs */
|
||||||
|
#if !defined(G_WINAPI_ONLY_APP)
|
||||||
if ((snapshot = CreateToolhelp32Snapshot (TH32CS_SNAPMODULE, 0)) == (HANDLE) -1)
|
if ((snapshot = CreateToolhelp32Snapshot (TH32CS_SNAPMODULE, 0)) == (HANDLE) -1)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
@ -143,6 +146,7 @@ find_in_any_module_using_toolhelp (const gchar *symbol_name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
CloseHandle (snapshot);
|
CloseHandle (snapshot);
|
||||||
|
#endif
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user