Commit 29f33e7b authored by Ka Ho Ng's avatar Ka Ho Ng Committed by Howard Chu
Browse files

ITS#8978 Fix mdb_env_open2() failing when getting handle for NTDLL.dll

Always call GetModuleHandleW() with Unicode string, as mdb_fopen() is
calling CreateFileW() already.
parent a51fb486
......@@ -5053,7 +5053,7 @@ mdb_env_open2(MDB_env *env, int prev)
/* Grab functions we need from NTDLL */
if (!NtCreateSection) {
HMODULE h = GetModuleHandle("NTDLL.DLL");
HMODULE h = GetModuleHandleW(L"NTDLL.DLL");
if (!h)
NtClose = (NtCloseFunc *)GetProcAddress(h, "NtClose");
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment