From: Paul Gofman pgofman@codeweavers.com
--- dlls/dbghelp/module.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c index 3f009b6b1ef..d604d4f4b2c 100644 --- a/dlls/dbghelp/module.c +++ b/dlls/dbghelp/module.c @@ -1290,6 +1290,12 @@ BOOL WINAPI EnumerateLoadedModulesW64(HANDLE process, WCHAR* wowdir = NULL; size_t sysdir_len = 0, wowdir_len = 0;
+ if (process != GetCurrentProcess() && GetCurrentProcessId() == GetProcessId(process)) + { + TRACE("same process.\n"); + process = GetCurrentProcess(); + } + /* process might not be a handle to a live process */ if (!IsWow64Process2(process, &pcs_machine, &native_machine)) {