Kaydet (Commit) 842a7bcb authored tarafından Matthias Huetsch [mhu]'s avatar Matthias Huetsch [mhu]

mhu23 #i113531# use recommended Windows linker flags and DLL search path.

üst 5394e06d
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment