小编Pol*_*ial的帖子

从线程信息中获取模块名称

我正在尝试获取进程中每个线程的模块名称.进程资源管理器显示与每个线程关联的模块的名称没有问题.我可以毫无问题地枚举当前进程中的所有模块和所有线程,并获取与它们相关的数据.我目前推断相关模块的方法如下:

if(module.BaseAddress < thread.StartAddress && (module.BaseAddress + module.BaseMemorySize) > thread.StartAddress)
{
    // this is our module ;)
}
Run Code Online (Sandbox Code Playgroud)

不幸的是,这似乎并不是一种具体的方式.xfire_toucan.dll模块在procexp中显示正常:

1972 : xfire_toucan.dll!ToucanSendGamestatsConsoleLine_V1+0x80
Run Code Online (Sandbox Code Playgroud)

在模块列表中,它显示了一个基本地址0x10000000和大小为0x26b000,给我们一个最大内存地址0x1026b000.但是,关联的线程起始地址是0x775e2ca0模块主存储器范围之外的进程中已分配的存储器块的一部分.

知道如何获得像ProcExp这样的模块吗?

我知道C和C#,所以要么很好,但我的项目是C#所以这是首选:]

c# windows winapi multithreading module

5
推荐指数
1
解决办法
2369
查看次数

标签 统计

c# ×1

module ×1

multithreading ×1

winapi ×1

windows ×1