Commit 4b5b89cd authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

win32: use SetThreadErrorMode() if available

parent 170e5561
......@@ -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 )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment