diff options
author | James Ross-Gowan <rossymiles@gmail.com> | 2015-12-06 11:36:30 +1100 |
---|---|---|
committer | James Ross-Gowan <rossymiles@gmail.com> | 2015-12-20 21:06:02 +1100 |
commit | d2013b3f500b22e52ebc1fec7256cab4ae1197ec (patch) | |
tree | 1af21f0b4bad958300d3fa898daa8edf228f3ac3 /osdep/main-fn-win.c | |
parent | 5790bbba61a296785e92521e8c662bb6881e4f64 (diff) | |
download | mpv-d2013b3f500b22e52ebc1fec7256cab4ae1197ec.tar.bz2 mpv-d2013b3f500b22e52ebc1fec7256cab4ae1197ec.tar.xz |
win32: remove SetDllDirectoryW dynamic loading
All Windows versions we support have this API.
Diffstat (limited to 'osdep/main-fn-win.c')
-rw-r--r-- | osdep/main-fn-win.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/osdep/main-fn-win.c b/osdep/main-fn-win.c index 5b0f22058d..84a77a3903 100644 --- a/osdep/main-fn-win.c +++ b/osdep/main-fn-win.c @@ -38,15 +38,12 @@ static void microsoft_nonsense(void) HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0); HMODULE kernel32 = GetModuleHandleW(L"kernel32.dll"); - WINBOOL (WINAPI *pSetDllDirectory)(LPCWSTR lpPathName) = - (WINBOOL (WINAPI *)(LPCWSTR))GetProcAddress(kernel32, "SetDllDirectoryW"); WINBOOL (WINAPI *pSetSearchPathMode)(DWORD Flags) = (WINBOOL (WINAPI *)(DWORD))GetProcAddress(kernel32, "SetSearchPathMode"); // Always use safe search paths for DLLs and other files, ie. never use the // current directory - if (pSetSearchPathMode) - pSetDllDirectory(L""); + SetDllDirectoryW(L""); if (pSetSearchPathMode) pSetSearchPathMode(BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE); } |