Use simple LoadLibrary() function

This commit is contained in:
Bertrand Bellenot 2016-11-30 09:56:14 +01:00 committed by sftnight
parent aa5b7fe2ce
commit 23d3c1669d

View File

@ -507,10 +507,9 @@ bool IsMemoryValid(const void *P) {
}
const void* DLOpen(const std::string& Path, std::string* Err) {
HMODULE dyLibHandle = ::LoadLibraryExA(Path.c_str(), NULL,
DONT_RESOLVE_DLL_REFERENCES);
HMODULE dyLibHandle = ::LoadLibraryA(Path.c_str());
if (!dyLibHandle && Err)
GetLastErrorAsString(*Err, "LoadLibraryEx");
GetLastErrorAsString(*Err, "LoadLibrary");
return reinterpret_cast<void*>(dyLibHandle);
}