IoCreateNotificationEvent 同步r3和r0

本文介绍了在驱动开发中如何利用IoCreateNotificationEvent进行用户态(r3)和内核态(r0)的同步。通过创建命名事件对象,驱动和应用程序可以通过IOCTL传递句柄实现通信。在DriverEntry中创建事件对象,并在用户模式下等待,内核态通过KeSetEvent和KeClearEvent控制线程执行。
摘要由CSDN通过智能技术生成

今天逆向驱动加载防火墙看到了这个函数

PKEVENT 
  IoCreateNotificationEvent(
    IN PUNICODE_STRING  EventName,
    OUT PHANDLE  EventHandle
    );

ddk中说可以用于r3和r0同步和便于传递信息,使用共享的事件对象有以下2个办法:

  • The user-mode application creates the event object and passes a handle to the object to the driver by sending an IOCTL to the driver. The driver must handle the IOCTL in the context of the process that created the event object and must validate the handle by calling ObReferenceObjectByHandle. This method is the recommended method for sharing event objects between user a
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值