diff options
-rw-r--r-- | loader/module.c | 4 | ||||
-rw-r--r-- | mplayer.c | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/loader/module.c b/loader/module.c index 6f3f0c3de9..6182d4b190 100644 --- a/loader/module.c +++ b/loader/module.c @@ -381,6 +381,10 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags) // if(fs_installed==0) // install_fs(); + // Do not load libraries from a path relative to the current directory + if (*libname != '/') + i++; + while (wm == 0 && listpath[++i]) { if (i < 2) @@ -3210,9 +3210,13 @@ int i; { HMODULE kernel32 = GetModuleHandle("Kernel32.dll"); BOOL WINAPI (*setDEP)(DWORD) = NULL; - if (kernel32) + BOOL WINAPI (*setDllDir)(LPCTSTR) = NULL; + if (kernel32) { setDEP = GetProcAddress(kernel32, "SetProcessDEPPolicy"); + setDllDir = GetProcAddress(kernel32, "SetDllDirectoryA"); + } if (setDEP) setDEP(3); + if (setDllDir) setDllDir(""); } // stop Windows from showing all kinds of annoying error dialogs SetErrorMode(0x8003); |