diff options
author | Tor Lillqvist <tlillqvist@suse.com> | 2011-09-09 09:28:13 +0300 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@suse.com> | 2011-09-12 10:21:07 +0300 |
commit | 31f7d27c2ca5f7decd6d79d6fff284f38e8a90f0 (patch) | |
tree | 99d21ad557741f8fc44c2c07368353fb53b21ab8 /sal | |
parent | Add pleas for help to explain a mysterious piece of code (diff) | |
download | core-31f7d27c2ca5f7decd6d79d6fff284f38e8a90f0.tar.gz core-31f7d27c2ca5f7decd6d79d6fff284f38e8a90f0.zip |
Don't bother with SetProcessDEPPolicy() on _WIN64 where it is always on
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/w32/salinit.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sal/osl/w32/salinit.cxx b/sal/osl/w32/salinit.cxx index ffe2c7e70132..806c35bc7536 100644 --- a/sal/osl/w32/salinit.cxx +++ b/sal/osl/w32/salinit.cxx @@ -47,11 +47,14 @@ void SAL_CALL sal_detail_initialize(int argc, char ** argv) // BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE | BASE_SEARCH_PATH_PERMANENT); HMODULE h = GetModuleHandleW(L"kernel32.dll"); if (h != 0) { - FARPROC p = GetProcAddress(h, "SetProcessDEPPolicy"); + FARPROC p; +#ifndef _WIN64 + p = GetProcAddress(h, "SetProcessDEPPolicy"); if (p != 0) { reinterpret_cast< BOOL (WINAPI *)(DWORD) >(p)(0x00000001); - } - p = GetProcAddress(h, "SetDllDirectoryW"); + } +#endif + p = GetProcAddress(h, "SetDllDirectoryW"); if (p != 0) { reinterpret_cast< BOOL (WINAPI *)(LPCWSTR) >(p)(L""); } |