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.
mdb.master3
Ka Ho Ng 6 years ago committed by Howard Chu
parent a51fb486d8
commit 29f33e7b3a
  1. 2
      libraries/liblmdb/mdb.c

@ -5053,7 +5053,7 @@ mdb_env_open2(MDB_env *env, int prev)
env->me_pidquery = PROCESS_QUERY_INFORMATION;
/* Grab functions we need from NTDLL */
if (!NtCreateSection) {
HMODULE h = GetModuleHandle("NTDLL.DLL");
HMODULE h = GetModuleHandleW(L"NTDLL.DLL");
if (!h)
return MDB_PROBLEM;
NtClose = (NtCloseFunc *)GetProcAddress(h, "NtClose");

Loading…
Cancel
Save