aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/alarm-notify/notify-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/alarm-notify/notify-main.c')
-rw-r--r--calendar/alarm-notify/notify-main.c39
1 files changed, 3 insertions, 36 deletions
diff --git a/calendar/alarm-notify/notify-main.c b/calendar/alarm-notify/notify-main.c
index 11fd5a9545..7baafeaf25 100644
--- a/calendar/alarm-notify/notify-main.c
+++ b/calendar/alarm-notify/notify-main.c
@@ -33,14 +33,7 @@
#include "config-data.h"
#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
+#include <libedataserver/libedataserver.h>
#endif
#include "e-util/e-util-private.h"
@@ -52,28 +45,9 @@ main (gint argc,
AlarmNotify *alarm_notify_service;
gint exit_status;
GError *error = NULL;
-#ifdef G_OS_WIN32
- gchar *path;
- /* Reduce risks */
- {
- typedef BOOL (WINAPI *t_SetDllDirectoryA) (LPCSTR lpPathName);
- t_SetDllDirectoryA p_SetDllDirectoryA;
-
- p_SetDllDirectoryA = GetProcAddress (GetModuleHandle ("kernel32.dll"), "SetDllDirectoryA");
- if (p_SetDllDirectoryA)
- (*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)
- (*p_SetProcessDEPPolicy) (PROCESS_DEP_ENABLE | PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION);
- }
-#endif
+#ifdef G_OS_WIN32
+ e_util_win32_initialize ();
#endif
bindtextdomain (GETTEXT_PACKAGE, EVOLUTION_LOCALEDIR);
@@ -84,13 +58,6 @@ main (gint argc,
e_gdbus_templates_init_main_thread ();
-#ifdef G_OS_WIN32
- path = g_build_path (";", _e_get_bindir (), g_getenv ("PATH"), NULL);
-
- if (!g_setenv ("PATH", path, TRUE))
- g_warning ("Could not set PATH for Evolution Alarm Notifier");
-#endif
-
alarm_notify_service = alarm_notify_new (NULL, &error);
if (error != NULL) {