Skip to content
Snippets Groups Projects
Commit 4ff98ff5 authored by Steve Lhomme's avatar Steve Lhomme
Browse files

win32: don't use SetThreadErrorMode in XBOX builds

LoadLibraryExW is available, but not SetThreadErrorMode.
DLL dependencies/errors need to be managed by the host app.

This is a sandboxed environment where the library dependencies
need to be managed manually per platform.
parent de4b18eb
No related branches found
No related tags found
1 merge request!3343win32: don't use SetThreadErrorMode in XBOX builds
Pipeline #318909 passed with stage
in 18 minutes and 36 seconds
......@@ -57,15 +57,22 @@ void *vlc_dlopen(const char *psz_file, bool lazy)
return NULL;
HMODULE handle = NULL;
#ifndef VLC_WINSTORE_APP
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
DWORD mode;
if (SetThreadErrorMode (SEM_FAILCRITICALERRORS, &mode) != 0)
{
handle = LoadLibraryExW(wfile, NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
SetThreadErrorMode (mode, NULL);
}
#else
#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
handle = LoadPackagedLibrary( wfile, 0 );
#elif defined(WINAPI_FAMILY_GAMES) && (WINAPI_FAMILY == WINAPI_FAMILY_GAMES)
// SEM_FAILCRITICALERRORS is not available on Xbox, error messages are not
// possible. This is a sandboxed environment where the library dependencies
// need to be managed manually per platform.
handle = LoadLibraryExW(wfile, NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
#else
#error Unknown Windows Platform!
#endif
free (wfile);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment