summaryrefslogtreecommitdiff
path: root/addressbook
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2015-05-05 17:09:00 +0200
committerMilan Crha <mcrha@redhat.com>2015-05-05 17:09:00 +0200
commit6210ab1503aaccd6b7f474a9e20582f3cb1c8a2a (patch)
tree6a910e492a75f81f439dbaf369c896403af7cdd9 /addressbook
parentfe7affe900a6d8158306f6741efb81e64661fe0f (diff)
downloadevolution-data-server-6210ab1503aaccd6b7f474a9e20582f3cb1c8a2a.tar.gz
[Win32] Use common Win32 init function in book/cal subprocesses
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/libedata-book/evolution-addressbook-factory-subprocess.c40
1 files changed, 2 insertions, 38 deletions
diff --git a/addressbook/libedata-book/evolution-addressbook-factory-subprocess.c b/addressbook/libedata-book/evolution-addressbook-factory-subprocess.c
index f54ae65d9..388d52461 100644
--- a/addressbook/libedata-book/evolution-addressbook-factory-subprocess.c
+++ b/addressbook/libedata-book/evolution-addressbook-factory-subprocess.c
@@ -27,19 +27,9 @@
#include <gtk/gtk.h>
#endif
-#ifdef G_OS_WIN32
-#include <windows.h>
-#include <conio.h>
-#ifndef PROCESS_DEP_ENABLE
-#define PROCESS_DEP_ENABLE 0x00000001
-#endif
-#ifndef PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION
-#define PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION 0x00000002
-#endif
-#endif
-
#include <e-dbus-subprocess-backend.h>
#include <libebackend/libebackend.h>
+#include <libedataserver/libedataserver.h>
#include <libedata-book/libedata-book.h>
typedef struct _SubprocessData SubprocessData;
@@ -164,33 +154,7 @@ main (gint argc,
GError *error = NULL;
#ifdef G_OS_WIN32
- /* Reduce risks */
- {
- typedef BOOL (WINAPI *t_SetDllDirectoryA) (LPCSTR lpPathName);
- t_SetDllDirectoryA p_SetDllDirectoryA;
-
- p_SetDllDirectoryA = GetProcAddress (
- GetModuleHandle ("kernel32.dll"),
- "SetDllDirectoryA");
-
- if (p_SetDllDirectoryA != NULL)
- p_SetDllDirectoryA ("");
- }
-#ifndef _WIN64
- {
- typedef BOOL (WINAPI *t_SetProcessDEPPolicy) (DWORD dwFlags);
- t_SetProcessDEPPolicy p_SetProcessDEPPolicy;
-
- p_SetProcessDEPPolicy = GetProcAddress (
- GetModuleHandle ("kernel32.dll"),
- "SetProcessDEPPolicy");
-
- if (p_SetProcessDEPPolicy != NULL)
- p_SetProcessDEPPolicy (
- PROCESS_DEP_ENABLE |
- PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION);
- }
-#endif
+ e_util_win32_initialize ();
#endif
setlocale (LC_ALL, "");