Revert "browser(winldd): attempt to fix dependency loading on windows (#7790)" (#7948)

This reverts commit c1d6c4b25e.
This commit is contained in:
Max Schmitt 2021-08-02 16:28:16 +02:00 committed by GitHub
parent 5e0a60fca1
commit a050c00b6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1 +1 @@
1005
1006

View File

@ -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, LOAD_LIBRARY_AS_IMAGE_RESOURCE | LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_SEARCH_DEFAULT_DIRS | LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR);
HMODULE hModDep = LoadLibraryEx(dllName, NULL, DONT_RESOLVE_DLL_REFERENCES | LOAD_LIBRARY_SEARCH_USER_DIRS | LOAD_LIBRARY_SEARCH_SYSTEM32);
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, LOAD_LIBRARY_AS_IMAGE_RESOURCE | LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_SEARCH_DEFAULT_DIRS | LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR);
HMODULE hMod = LoadLibraryEx(library, NULL, DONT_RESOLVE_DLL_REFERENCES | LOAD_LIBRARY_SEARCH_USER_DIRS | LOAD_LIBRARY_SEARCH_SYSTEM32);
if (hMod == NULL)
{
std::cerr << "Failed to load " << library << " Error: " << getLastErrorString() << std::endl;