获取当前进程中加载​​的 DLL 列表及其引用计数 [英] Get list of DLLs loaded in current process with their reference counts

查看:39
本文介绍了获取当前进程中加载​​的 DLL 列表及其引用计数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何获取这些信息.(来自_PEB_LDR_DATA.)

I know how to get this information. (From _PEB_LDR_DATA.)

问题是,我如何从同一进程原子地获取这些信息?(为了从不同的进程获取这些信息,我会暂停它.)

Question is, how do I get this information atomically from same process? (To get this information from different process, I would suspend it.)

我应该挂起当前进程的所有其他线程吗?或者有更简单的方法吗?

Should I suspend all other threads of current process? Or there is an easier way?

推荐答案

答案是使用 工具帮助功能.它以原子方式提供运行时链接的 dll 的正确引用计数.

The answer is to use Tool Help Functions. It provides correct reference counts of runtime-linked dlls, atomically.

感谢@Harry 的评论.

Credits to @Harry for his comment.

这篇关于获取当前进程中加载​​的 DLL 列表及其引用计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆