[vlc-commits] Win32: simplify WinRT LoadLibrary handling
Jean-Baptiste Kempf
git at videolan.org
Wed Mar 8 23:43:50 CET 2017
vlc/vlc-2.2 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Jul 1 13:42:20 2016 +0200| [bdc06d360bb87bf908828cd5d87617c1cd3525ed] | committer: Jean-Baptiste Kempf
Win32: simplify WinRT LoadLibrary handling
(cherry picked from commit 24c12339c4576006764224b25115996cdb7afe8b)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=bdc06d360bb87bf908828cd5d87617c1cd3525ed
---
src/win32/plugin.c | 7 +++----
src/win32/specific.c | 3 ---
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/win32/plugin.c b/src/win32/plugin.c
index cd088a5..96cd246 100644
--- a/src/win32/plugin.c
+++ b/src/win32/plugin.c
@@ -62,15 +62,14 @@ int module_Load( vlc_object_t *p_this, const char *psz_file,
module_handle_t handle = NULL;
#if (_WIN32_WINNT >= 0x601) && !VLC_WINSTORE_APP
DWORD mode;
-
if (SetThreadErrorMode (SEM_FAILCRITICALERRORS, &mode) != 0)
-#endif
{
handle = LoadLibraryExW (wfile, NULL, LoadLibraryFlags );
-#if (_WIN32_WINNT >= 0x601) && !VLC_WINSTORE_APP
SetThreadErrorMode (mode, NULL);
-#endif
}
+#else
+ LoadPackagedLibrary( wfile )
+#endif
free (wfile);
if( handle == NULL )
diff --git a/src/win32/specific.c b/src/win32/specific.c
index 503ca27..376d672 100644
--- a/src/win32/specific.c
+++ b/src/win32/specific.c
@@ -73,9 +73,6 @@ void system_Init(void)
LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR |
LOAD_LIBRARY_SEARCH_SYSTEM32;
}
-#else
- LoadLibraryFlags = LOAD_LIBRARY_SEARCH_APPLICATION_DIR |
- LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR;
#endif
}
More information about the vlc-commits
mailing list