[vlc-commits] win32: don´t clobber proce =?UTF-8?Q?ss=20DLL=20directories=20?=(fixes #17633)
Rémi Denis-Courmont
git at videolan.org
Fri Nov 18 19:15:22 CET 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Nov 18 20:13:34 2016 +0200| [1eb18305aa3185cd0c6d4d5aa22ff8b5cd3f5755] | committer: Rémi Denis-Courmont
win32: don´t clobber process DLL directories (fixes #17633)
LibVLC has zero business messing with process state. This breaks
apps other than VLC and other libraries in the same process.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1eb18305aa3185cd0c6d4d5aa22ff8b5cd3f5755
---
src/win32/specific.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/win32/specific.c b/src/win32/specific.c
index e9e0bd5..d2d5451 100644
--- a/src/win32/specific.c
+++ b/src/win32/specific.c
@@ -65,16 +65,13 @@ void system_Init(void)
fputs("Error: cannot initialize Winsocks\n", stderr);
#if !VLC_WINSTORE_APP
- typedef BOOL (WINAPI *SetDefaultDllDirectoriesFunc)( DWORD DirectoryFlags);
- SetDefaultDllDirectoriesFunc pf_SetDefDllDir = (SetDefaultDllDirectoriesFunc)
- GetProcAddress( GetModuleHandleW(TEXT("kernel32.dll")), "SetDefaultDllDirectories");
-
- if( pf_SetDefDllDir ) {
- pf_SetDefDllDir( LOAD_LIBRARY_SEARCH_SYSTEM32 );
+# if (_WIN32_WINNT < _WIN32_WINNT_WIN8)
+ if (GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")),
+ "SetDefaultDllDirectories") != NULL)
+# endif /* FIXME: not reentrant */
LoadLibraryFlags = LOAD_LIBRARY_SEARCH_APPLICATION_DIR |
LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR |
LOAD_LIBRARY_SEARCH_SYSTEM32;
- }
#endif
}
More information about the vlc-commits
mailing list