[vlc-commits] Win32: Use SetErrorMode as fallback on XP, 2003, 2003R2
Jean-Baptiste Kempf
git at videolan.org
Tue Jan 19 11:04:34 CET 2016
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Jan 19 10:50:50 2016 +0100| [e44f6165c138a1e715b5dd738155f9eb6dc90143] | committer: Jean-Baptiste Kempf
Win32: Use SetErrorMode as fallback on XP, 2003, 2003R2
This is quite bad, but this is the only fallback solution.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e44f6165c138a1e715b5dd738155f9eb6dc90143
---
src/win32/plugin.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/win32/plugin.c b/src/win32/plugin.c
index ac9ea0a..db3b61b 100644
--- a/src/win32/plugin.c
+++ b/src/win32/plugin.c
@@ -56,6 +56,15 @@ static BOOL WINAPI SetThreadErrorModeFallback(DWORD mode, DWORD *oldmode)
GetErrorModeReal = (void *)GetProcAddress(h, "GetErrorMode");
if (GetErrorModeReal != NULL)
curmode = GetErrorModeReal();
+ else
+ {
+ /* We are on XP, 2003, 2003/R2 or some special versions of Vista:
+ No SetThreadErrorMode, no GetErrorMode.
+ We will set the mode for the whole process, which is quite bad,
+ but is our only solution */
+ SetErrorMode( mode );
+ return TRUE;
+ }
# endif
/* Extra flags should be OK. Missing flags are NOT OK. */
if ((mode & curmode) != mode)
More information about the vlc-commits
mailing list