问题描述
我知道要接收有关 Win32 进程创建或终止的通知,我们可能会使用 API PsSetCreateProcessNotifyRoutine() 实现 NT 内核模式驱动程序,该 API 提供注册系统范围回调函数的能力,该函数是每次新进程启动、退出或终止时由操作系统调用.
I know that to receive notifications about Win32 process creation or termination we might implement a NT kernel-mode driver using the APIs PsSetCreateProcessNotifyRoutine() that offers the ability to register system-wide callback function which is called by OS each time when a new process starts, exits or is terminated.
这是否可以不创建 NT 内核模式驱动程序,仅使用使用 c++ 的 Win32 API 函数?当然不是使用无限循环查询活动进程列表的基本解决方案.
Is this possible without creating a NT kernel-mode driver, only using Win32 API functions using c++? Not using the basic solution of a infinite cycle querying the list of active process of course.
是否有任何库或 win32 API 提供相同的功能(系统范围的回调、异步事件)?
Is there any library or win32 API that provides the same functionality (system wide callback, asynchronous events)?
推荐答案
我唯一能想到的就是 WMI,不确定它是否提供进程创建回调,但可能值得研究.
The only thing I could think of is WMI, not sure if it provides a process creation callback, but it might be worth looking into.
这篇关于如何在 C++ 中检测 win32 进程的创建/终止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)