browser(winldd): attempt to fix dependency loading on windows (#7790)
References #7560
This commit is contained in:
parent
ff8bd0fef2
commit
c1d6c4b25e
|
|
@ -1 +1 @@
|
|||
1004
|
||||
1005
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ const DepsMap getDependencies(const HMODULE hMod)
|
|||
{
|
||||
LPCSTR dllName = (LPCSTR)((BYTE*)hMod + pImportDesc->Name);
|
||||
std::string dllPath = "not found";
|
||||
HMODULE hModDep = LoadLibraryEx(dllName, NULL, DONT_RESOLVE_DLL_REFERENCES | LOAD_LIBRARY_SEARCH_USER_DIRS | LOAD_LIBRARY_SEARCH_SYSTEM32);
|
||||
HMODULE hModDep = LoadLibraryEx(dllName, NULL, LOAD_LIBRARY_AS_IMAGE_RESOURCE | LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_SEARCH_DEFAULT_DIRS | LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR);
|
||||
if (hModDep != NULL)
|
||||
{
|
||||
TCHAR pathBuffer[_MAX_PATH];
|
||||
|
|
@ -97,7 +97,7 @@ const DepsMap getDependencies(const HMODULE hMod)
|
|||
int printDependencies(const char* library)
|
||||
{
|
||||
SetDllDirectoryA(".");
|
||||
HMODULE hMod = LoadLibraryEx(library, NULL, DONT_RESOLVE_DLL_REFERENCES | LOAD_LIBRARY_SEARCH_USER_DIRS | LOAD_LIBRARY_SEARCH_SYSTEM32);
|
||||
HMODULE hMod = LoadLibraryEx(library, NULL, LOAD_LIBRARY_AS_IMAGE_RESOURCE | LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_SEARCH_DEFAULT_DIRS | LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR);
|
||||
if (hMod == NULL)
|
||||
{
|
||||
std::cerr << "Failed to load " << library << " Error: " << getLastErrorString() << std::endl;
|
||||
|
|
|
|||
Loading…
Reference in a new issue