summaryrefslogtreecommitdiff
path: root/gmodule/gmodule-win32.c
diff options
context:
space:
mode:
authorHyunjee Kim <hj0426.kim@samsung.com>2019-12-03 11:01:36 +0900
committerHyunjee Kim <hj0426.kim@samsung.com>2019-12-03 11:01:36 +0900
commit3751706729c090c34d59c5284c3f80063a337afc (patch)
tree2f9ba678f1139115c131d13624707052457aae50 /gmodule/gmodule-win32.c
parent85ef543166f81464323d083c9a21096cc634cad0 (diff)
downloadglib-3751706729c090c34d59c5284c3f80063a337afc.tar.gz
glib-3751706729c090c34d59c5284c3f80063a337afc.tar.bz2
glib-3751706729c090c34d59c5284c3f80063a337afc.zip
Imported Upstream version 2.61.3
Diffstat (limited to 'gmodule/gmodule-win32.c')
-rw-r--r--gmodule/gmodule-win32.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gmodule/gmodule-win32.c b/gmodule/gmodule-win32.c
index 1c7226a68..795dc0938 100644
--- a/gmodule/gmodule-win32.c
+++ b/gmodule/gmodule-win32.c
@@ -39,12 +39,6 @@
#include <sys/cygwin.h>
#endif
-/* Default family is DESKTOP_APP which is DESKTOP | APP
- * We want to know when we're only building for apps */
-#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
-#define G_WINAPI_ONLY_APP
-#endif
-
static void
set_error (const gchar *format,
...)
@@ -133,8 +127,11 @@ find_in_any_module_using_toolhelp (const gchar *symbol_name)
HANDLE snapshot;
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)
return NULL;
@@ -149,6 +146,7 @@ find_in_any_module_using_toolhelp (const gchar *symbol_name)
}
CloseHandle (snapshot);
+#endif
return p;
}