在Windows下获取新线程/已删除线程的通知 [英] Get notifications of new threads / deleted threads under Windows
本文介绍了在Windows下获取新线程/已删除线程的通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
创建DLL时,您可以在DllMain函数(DLL_THREAD_ATTACH/DLL_THREAD_DETACH)中获得有关新线程/退出线程的通知.
When you create a DLL you can get notifications about new threads / exiting threads in the DllMain function (DLL_THREAD_ATTACH/DLL_THREAD_DETACH).
是否有办法从Windows(非托管)可执行文件中获取这些通知或等效通知?
Is there a way to get these or equivalent notifications from Windows within an (non managed) Executable?
推荐答案
是的-在您的进程中包含一个小的存根DLL,可以按您希望的方式简单地监视DLL_THREAD_ATTACH和DLL_THREAD_DETACH.
Yes - include a small stub DLL in your process that simply monitors DLL_THREAD_ATTACH and DLL_THREAD_DETACH in the way you want.
这篇关于在Windows下获取新线程/已删除线程的通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文