mirror of
https://github.com/videolan/vlc.git
synced 2024-12-13 19:54:18 +08:00
win32: use SetThreadErrorMode() if available
This commit is contained in:
parent
170e5561c1
commit
4b5b89cd4b
@ -57,10 +57,18 @@ int module_Load( vlc_object_t *p_this, const char *psz_file,
|
||||
if (wfile == NULL)
|
||||
return -1;
|
||||
|
||||
module_handle_t handle;
|
||||
|
||||
handle = LoadLibraryW (wfile);
|
||||
module_handle_t handle = NULL;
|
||||
#if (_WIN32_WINNT >= 0x601)
|
||||
DWORD mode;
|
||||
|
||||
if (SetThreadErrorMode (SEM_FAILCRITICALERRORS, &mode) == 0)
|
||||
#endif
|
||||
{
|
||||
handle = LoadLibraryW (wfile);
|
||||
#if (_WIN32_WINNT >= 0x601)
|
||||
SetThreadErrorMode (mode, NULL);
|
||||
#endif
|
||||
}
|
||||
free (wfile);
|
||||
|
||||
if( handle == NULL )
|
||||
|
Loading…
Reference in New Issue
Block a user