thanks for the update
a couple of remarks in various comments
testing on a 32bit only prefix, I get
``` toolhelp.c:504: Test failed: Cannot create snapshot 0x78 toolhelp.c:520: Test failed: Main exe was found 0 time(s) toolhelp.c:523: Test failed: Module kernel32.dll is not listed toolhelp.c:523: Test failed: Module shell32.dll is not listed toolhelp.c:523: Test failed: Module ntdll.dll is not listed toolhelp.c:540: Test failed: Main exe was found 0 time(s) toolhelp.c:543: Test failed: Module kernel32.dll is not listed toolhelp.c:543: Test failed: Module shell32.dll is not listed toolhelp.c:543: Test failed: Module ntdll.dll is not listed ```
also, since you don't test MODULE32 on old wow in this serie, and using a very simplistic usage of this in dbghelp EnumerateLoadedModules like
``` // keep existing with_32bit_modules computation hSnapshot = CreateToolhelp32Snapshot( TH32CS_SNAPMODULE | (with_32bit_modules ? TH32CS_SNAPMODULE32 : 0), pid); if (hSnapshot == INVALID_HANDLE_VALUE) return FALSE;
me.dwSize = sizeof(me); if (Module32FirstW( hSnapshot, &me )) { do { if (!enum_cb(me.szExePath, (DWORD_PTR)me.modBaseAddr, me.modBaseSize, user)) break; } while (Module32NextW( hSnapshot, &me )); } CloseHandle( hSnapshot ); ```
and running the dbghelp tests on it, I get success on new wow, but failures in 32 and 64bit tests on oldwow
(note: since there's no old wow on native, we can decide what it's returned in that case)
get no modules for a 64bit process querying a 64bit target, and a bunch of errors in a 64/32 query
so I suppose something in wrong in the old configuration with this MR