windows – 用户模式应用程序和内核模式驱动程序之间的双向交互?

前端之家收集整理的这篇文章主要介绍了windows – 用户模式应用程序和内核模式驱动程序之间的双向交互?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我即将撰写以下互动:
  • When there is a process about to start,driver will notify user app and then it will wait for response from the app.

  • The app will decide whether or not to allow that process to be created normally or terminated immediately,and send
    its decision back to the driver.

  • Base on the decision from user app. The driver will then allow or block the process execution.

我的问题是:从驱动程序通知用户模式应用程序然后让驱动程序等待响应的建议方法是什么?

对于事件通知,您可以使用通知事件.即内核调用IoCreateNotificationEvent和KeSetEvent.用户调用KeWaitForSingleObject.对于用户内核消息通信,您可以使用IOCTL.

或者,您可以只使用命名管道.

附:您不能将PsSetCreateProcessNotifyRoutine()用于您的目的,因为它仅用于审核,但不用于预防/取消.

猜你在找的Windows相关文章