odbccp32: Append DLL path when loading driver.

For example, loading by full path myodbc8a.dll can cause a load
failure since it dependencies libcrypto-1_1.dll, libssl-1_1.dll
are in the DLL directory.
This commit is contained in:
Alistair Leslie-Hughes 2023-02-05 14:54:48 +11:00 committed by Alexandre Julliard
parent cb3388f76a
commit 6714e32d73

View file

@ -271,7 +271,7 @@ static HMODULE load_config_driver(const WCHAR *driver)
return NULL; return NULL;
} }
hmod = LoadLibraryW(filename); hmod = LoadLibraryExW(filename, NULL, LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR | LOAD_LIBRARY_SEARCH_DEFAULT_DIRS);
HeapFree(GetProcessHeap(), 0, filename); HeapFree(GetProcessHeap(), 0, filename);
if(!hmod) if(!hmod)