summaryrefslogtreecommitdiff
path: root/gio/gdbusaddress.c
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2013-08-15 21:27:02 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2013-08-21 20:28:26 +0800
commitbb7b0a8ca01c0f463fbd7a66cab686b9160ff59a (patch)
treefe532fb7602fcb7e5e1ed48de338115bba4759d5 /gio/gdbusaddress.c
parent2ff85ca47c4aa4ea67314bfade58ea087df6fb20 (diff)
downloadglib-bb7b0a8ca01c0f463fbd7a66cab686b9160ff59a.tar.gz
gio/gdbusaddress.c: Silence RunDLL errors
The RunDLL command call during get_session_address_dbus_launch() was expecting _g_win32_run_session_bus@16 and g_win32_run_session_bus on Win32 and Win64 respectively at least when GLib is compiled with MSVC, not g_win32_run_session_bus@16, which caused annoying RunDLL error dialogue boxes to show up during the use of GtkApplication (such as when running gtk3-demo-application on Windows), prevented GtkApplication items from being run for more than one time during the lifespan of the program, and this also interfered with some GTK+ tests, causing them to fail. Update accordingly to address the issue.
Diffstat (limited to 'gio/gdbusaddress.c')
-rw-r--r--gio/gdbusaddress.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c
index 79b4bd6b5..b5143cfe8 100644
--- a/gio/gdbusaddress.c
+++ b/gio/gdbusaddress.c
@@ -1400,7 +1400,15 @@ get_session_address_dbus_launch (GError **error)
wcscat (args, rundll_path);
wcscat (args, L"\" ");
wcscat (args, gio_path_short);
+#ifdef _MSC_VER
+#if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64)
+ wcscat (args, L",g_win32_run_session_bus");
+#else
+ wcscat (args, L",_g_win32_run_session_bus@16");
+#endif
+#else
wcscat (args, L",g_win32_run_session_bus@16");
+#endif
res = CreateProcessW (rundll_path, args,
0, 0, FALSE,