diff options
Diffstat (limited to 'sal/osl')
-rw-r--r-- | sal/osl/os2/system.h | 3 | ||||
-rw-r--r-- | sal/osl/w32/salinit.cxx | 20 |
2 files changed, 21 insertions, 2 deletions
diff --git a/sal/osl/os2/system.h b/sal/osl/os2/system.h index ac7e410c5a34..436ae0074a04 100644 --- a/sal/osl/os2/system.h +++ b/sal/osl/os2/system.h @@ -356,8 +356,7 @@ char *macxp_tempnam( const char *tmpdir, const char *prefix ); #if !defined(_WIN32) && !defined(_WIN16) && !defined(OS2) && \ !defined(LINUX) && !defined(NETBSD) && !defined(FREEBSD) && !defined(SCO) && \ !defined(AIX) && !defined(HPUX) && \ - !defined(SOLARIS) && !defined(MAC) && \ - !defined(MACOSX) + !defined(SOLARIS) && !defined(MACOSX) # error "Target plattform not specified !" #endif diff --git a/sal/osl/w32/salinit.cxx b/sal/osl/w32/salinit.cxx index aea584f67970..ab124620a07c 100644 --- a/sal/osl/w32/salinit.cxx +++ b/sal/osl/w32/salinit.cxx @@ -40,6 +40,26 @@ extern "C" { void SAL_CALL sal_detail_initialize(int argc, char ** argv) { + // SetProcessDEPPolicy(PROCESS_DEP_ENABLE); + // SetDllDirectoryW(L""); + // SetSearchPathMode( + // BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE | BASE_SEARCH_PATH_PERMANENT); + HMODULE h = GetModuleHandleW(L"kernel32.dll"); + if (h != 0) { + FARPROC p = GetProcAddress(h, "SetProcessDEPPolicy"); + if (p != 0) { + reinterpret_cast< BOOL (WINAPI *)(DWORD) >(p)(0x00000001); + } + p = GetProcAddress(h, "SetDllDirectoryW"); + if (p != 0) { + reinterpret_cast< BOOL (WINAPI *)(LPCWSTR) >(p)(L""); + } + p = GetProcAddress(h, "SetSearchPathMode"); + if (p != 0) { + reinterpret_cast< BOOL (WINAPI *)(DWORD) >(p)(0x8001); + } + } + WSADATA wsaData; int error; WORD wVersionRequested; |