Skip to content
Snippets Groups Projects
Commit 5c5ebd19 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

win32: call SetDllDirectort() directly

This looks like cargo cult. The function exists since XP SP1.
parent ba108368
No related branches found
No related tags found
No related merge requests found
......@@ -149,14 +149,11 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
if(mySetProcessDEPPolicy)
mySetProcessDEPPolicy(PROCESS_DEP_ENABLE);
/* Do NOT load any library from cwd. */
BOOL (WINAPI * mySetDllDirectoryA)(const char* lpPathName);
mySetDllDirectoryA = (BOOL (WINAPI *)(const char*))
GetProcAddress(h_Kernel32, "SetDllDirectoryA");
if(mySetDllDirectoryA)
mySetDllDirectoryA("");
}
/* Do NOT load any library from cwd. */
SetDllDirectory(TEXT(""));
/***
* The LoadLibrary* calls from the modules and the 3rd party code
* will search in SYSTEM32 only
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment