c - PsSetCreateProcessNotifyRoutine 回调

标签 c windows drivers

进程的主线程是在创建后立即开始执行,还是在回调例程完成后开始执行?

最佳答案

这似乎没有记录,这意味着不能保证线程不会在回调例程返回之前开始执行。

但是,CreateProcessNotifyEx 的文档常规说:

For a new process, the CreateProcessNotifyEx routine is called after the initial thread is created, but before the thread begins running. The driver can cause the process-creation operation to fail by changing the CreateInfo->CreationStatus member to an NTSTATUS error code.

因此,如果您需要在初始线程开始运行之前完成通知例程,请使用 PsSetCreateProcessNotifyRoutineEx而不是 PsSetCreateProcessNotifyRoutine .

关于c - PsSetCreateProcessNotifyRoutine 回调,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22586006/

相关文章:

java - 不能在eclipse中使用android手机作为模拟器

c++ - 导出函数,通过 DLL 转换为指针

C取消引用指向不完整类型的指针

c# - 如何从一句话中获取网站网址?

windows - 如何在预先创建的 VPC 中启动实例并且还应该为其配置公共(public) IP?

c - 我无法在这个简单的设备驱动程序模块中使用 echo 和 cat 。

c - tcc:错误: undefined symbol 'pthread_create'

c - C 中的加扰数组

windows - 在 WIndows 上获取 64 位进程的 TEB

linux - 为什么没有适用于 Linux 的 DirectX API?