Eric Pouech eric.pouech@wanadoo.fr writes:
l = min(ldr_mod[i].BaseDllName.Length, sizeof(mod->szModule) - sizeof(WCHAR));
memcpy(mod->szModule, ldr_mod[i].BaseDllName.Buffer, l);
mod->szModule[l / sizeof(WCHAR)] = '\0';
l = min(ldr_mod[i].FullDllName.Length, sizeof(mod->szModule) - sizeof(WCHAR));
memcpy(mod->szExePath, ldr_mod[i].FullDllName.Buffer, l);
This can't work, the dll name and path are in the address space of the target process.