diff options
| author | Federico Mena Quintero <federico@novell.com> | 2010-09-24 11:43:50 -0500 |
|---|---|---|
| committer | Federico Mena Quintero <federico@novell.com> | 2010-09-24 11:43:50 -0500 |
| commit | d4f0f65a53f0163e410a06684ac4c3404f5fd989 (patch) | |
| tree | 80a3c43b1053bc9f658b12fe1d05c4fe69b6c4fc /addressbook/libedata-book/e-data-book-factory.c | |
| parent | 192ec4d20f07fb5cf71e02ce5b7ea90eaa99595a (diff) | |
| parent | 4eef23360571d75a6cf83fecbc47cf0784e78267 (diff) | |
| download | evolution-data-server-d4f0f65a53f0163e410a06684ac4c3404f5fd989.tar.gz | |
Merge branch 'gnome-2-30' into camel-socks-proxycamel-socks-proxy
Diffstat (limited to 'addressbook/libedata-book/e-data-book-factory.c')
| -rw-r--r-- | addressbook/libedata-book/e-data-book-factory.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/addressbook/libedata-book/e-data-book-factory.c b/addressbook/libedata-book/e-data-book-factory.c index 821764ca5..5781adf07 100644 --- a/addressbook/libedata-book/e-data-book-factory.c +++ b/addressbook/libedata-book/e-data-book-factory.c @@ -38,6 +38,17 @@ #include "e-book-backend.h" #include "e-book-backend-factory.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 +#endif + #define d(x) static void impl_BookFactory_getBook(EDataBookFactory *factory, const gchar *IN_uri, DBusGMethodInvocation *context); @@ -425,6 +436,28 @@ main (gint argc, gchar **argv) guint32 request_name_ret; EOfflineListener *eol; +#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) + (*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 +#endif + g_type_init (); g_set_prgname (E_PRGNAME); if (!g_thread_supported ()) g_thread_init (NULL); |
