Suppress errors when dep libs aren't present (wmvcore.dll for ssc-wma, for example). Should close ticket #177

This commit is contained in:
Ron Pedde 2006-06-29 06:37:28 +00:00
parent 659751a485
commit b3b3f2f39c

View File

@ -702,11 +702,14 @@ void _os_unlock(void) {
*/ */
void *os_loadlib(char **pe, char *path) { void *os_loadlib(char **pe, char *path) {
void *retval; void *retval;
UINT old_mode;
old_mode = SetErrorMode(SEM_NOOPENFILEERRORBOX);
retval = (void*)LoadLibrary(path); retval = (void*)LoadLibrary(path);
if(!retval) { if(!retval) {
if(pe) *pe = strdup(os_strerror(0)); if(pe) *pe = strdup(os_strerror(0));
} }
SetErrorMode(old_mode);
return retval; return retval;
} }