When initializing a live target, ask to load module file names, not

module names (spotted by Robert Reif).
This commit is contained in:
Eric Pouech 2005-03-07 12:24:02 +00:00 committed by Alexandre Julliard
parent 9cf27b5f1a
commit f332412092
1 changed files with 8 additions and 1 deletions

View File

@ -139,7 +139,14 @@ BOOL WINAPI SymGetSearchPath(HANDLE hProcess, LPSTR szSearchPath,
*/
static BOOL WINAPI process_invade_cb(char* name, DWORD base, DWORD size, void* user)
{
SymLoadModule((HANDLE)user, 0, name, NULL, base, size);
char tmp[MAX_PATH];
HANDLE hProcess = (HANDLE)user;
if (!GetModuleFileNameExA(hProcess, (HMODULE)base,
tmp, sizeof(tmp)))
lstrcpynA(tmp, name, sizeof(tmp));
SymLoadModule(hProcess, 0, tmp, name, base, size);
return TRUE;
}