1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-15 15:53:55 +00:00

1. Fixed bug in self-update on Windows, when looking at argv

2. Added comments about LoadLibraryEx usage
3. Modified IsWow64() to use GetModuleHandleA() instead of LoadLibraryEx()
This commit is contained in:
Bryan Roe
2020-11-10 20:36:05 -08:00
parent cb7b76a1ab
commit 58a7305920
7 changed files with 33 additions and 86 deletions

View File

@@ -1577,8 +1577,7 @@ duk_ret_t ILibDuktape_ScriptContainer_OS_arch(duk_context *ctx)
}
else
{
HMODULE hm = LoadLibraryExA("Kernel32.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
void *func = (void*)GetProcAddress(hm, "IsWow64Process");
void *func = (void*)GetProcAddress(GetModuleHandleA("kernel32"), "IsWow64Process");
BOOL isWow = FALSE;
if (func != NULL)
@@ -1608,7 +1607,6 @@ duk_ret_t ILibDuktape_ScriptContainer_OS_arch(duk_context *ctx)
// We are 32 bit App running on 32 bit Windows
duk_push_string(ctx, "ia32");
}
FreeLibrary(hm);
}
return(1);
#else