[vlc-devel] [PATCH] win32:plugin: fix SetThreadErrorMode use on older windows

Steve Lhomme robux4 at gmail.com
Sun Jan 17 14:13:13 CET 2016


On Sat, Jan 16, 2016 at 7:19 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> On Friday 15 January 2016 14:10:49 Steve Lhomme wrote:
>> ---
>>  src/win32/plugin.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/src/win32/plugin.c b/src/win32/plugin.c
>> index ac9ea0a..81f3880 100644
>> --- a/src/win32/plugin.c
>> +++ b/src/win32/plugin.c
>> @@ -56,6 +56,8 @@ static BOOL WINAPI SetThreadErrorModeFallback(DWORD mode,
>> DWORD *oldmode) GetErrorModeReal = (void *)GetProcAddress(h,
>> "GetErrorMode"); if (GetErrorModeReal != NULL)
>>          curmode = GetErrorModeReal();
>> +    else
>> +        return TRUE;
>
> For this case to happen, either the process is very badly messed up (not sure
> if it´s even possible), or the OS version is historic.

Yes, as the patch title suggests, it's for old Windows versions. I
tested with XP SP3. Without this patch it doesn't load any plugin.
After this patch VLC works fine again on XP.

> Either way, the current code will return a clean error to the caller, and
> eventually the LibVLC app. This patch would a priori cause a critical failure
> to be thrown. That seems much worse.
>
> --
> Rémi Denis-Courmont
> http://www.remlab.net/
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list