[+] Win32Config::bProcessCheckWinLdrForModNameFirst
This commit is contained in:
parent
004eba6e09
commit
4f275184d3
@ -427,6 +427,11 @@ namespace Aurora
|
||||
AuUInt32 uProtocolStackDefaultBufferSize { 64 * 1024 };
|
||||
};
|
||||
|
||||
struct Win32Config
|
||||
{
|
||||
bool bProcessCheckWinLdrForModNameFirst { true };
|
||||
};
|
||||
|
||||
struct RuntimeStartInfo
|
||||
{
|
||||
ConsoleConfig console;
|
||||
@ -437,6 +442,7 @@ namespace Aurora
|
||||
AuAlignTo<64, DebugConfig> debug;
|
||||
AuAlignTo<32, ThreadingConfig> threadingConfig;
|
||||
AuAlignTo<32, LinuxConfig> linuxConfig;
|
||||
AuAlignTo<32, Win32Config> win32Config;
|
||||
AuAlignTo<32, ProcessConfig> processConfig;
|
||||
AuAlignTo<32, IOConfig> ioConfig;
|
||||
AuAlignTo<32, DummyConfig> padding;
|
||||
|
@ -410,6 +410,26 @@ namespace Aurora::Process
|
||||
AuString b = path + AuString({ AuFS::kPathSplitter }) + genericDll;
|
||||
|
||||
#if defined(AURORA_IS_MODERNNT_DERIVED)
|
||||
#if defined(AURORA_PLATFORM_WIN32)
|
||||
if (gRuntimeConfig.win32Config.bProcessCheckWinLdrForModNameFirst)
|
||||
{
|
||||
auto aW = AuLocale::ConvertFromUTF8(genericDll);
|
||||
auto bW = AuLocale::ConvertFromUTF8(auDll);
|
||||
|
||||
auto pDLL = ::GetModuleHandleW(aW.c_str());
|
||||
if (!pDLL)
|
||||
{
|
||||
pDLL = ::GetModuleHandleW(bW.c_str());
|
||||
}
|
||||
|
||||
if (pDLL)
|
||||
{
|
||||
gModuleHandles.insert(AuMakePair(request.mod, (void *)pDLL));
|
||||
return pDLL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
AuString aAbs = path + AuString({ AuFS::kPathSplitter }) + auDll + ".";
|
||||
AuString bAbs = path + AuString({ AuFS::kPathSplitter }) + genericDll + ".";
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user