当前位置: 首页 > news >正文

FltSendMessage 超时时间相关问题

之前做基于minifilter的windows文件过滤驱动时,会碰到fltsendmessage超时问题,查阅资料后特此记录下

NTSTATUS FLTAPI FltSendMessage([in]            PFLT_FILTER    Filter,[in]            PFLT_PORT      *ClientPort,[in]            PVOID          SenderBuffer,[in]            ULONG          SenderBufferLength,[out, optional] PVOID          ReplyBuffer,[in, out]       PULONG         ReplyLength,[in, optional]  PLARGE_INTEGER Timeout
);

[in, optional] Timeout

A pointer to a timeout value that specifies the total absolute or relative length of time, in units of 100 nanoseconds, for which the caller can be put into a wait state until the message is received by the user-mode application and until it receives a reply (if one is expected).

A positive value specifies an absolute time, relative to January 1, 1601. A negative value specifies an interval relative to the current time. Set to NULL if the caller can be put into a wait state indefinitely.

FltSendMessage sends a message to a user-mode application on behalf of a minifilter driver or a minifilter driver instance.

If the application calls FilterGetMessage to get the message before the minifilter driver calls FltSendMessage to send it, the message is delivered immediately. This is typically the case when the application calls FilterGetMessage from inside a message loop.

Otherwise, if an application has not called to get a message, the minifilter driver is put into a wait state as follows:

  • If Timeout is nonzero and the application calls FilterGetMessage before the Timeout interval expires, the message is delivered.

  • If Timeout is nonzero and the application doesn't call FilterGetMessage before the Timeout interval expires, the message is not delivered, and FltSendMessage returns STATUS_TIMEOUT. (Note: STATUS_TIMEOUT is a success code.)

  • If Timeout is zero, the minifilter driver is put into a wait state indefinitely. When the application calls FilterGetMessage, the message is delivered.

After the message is delivered, if ReplyBuffer is NULLFltSendMessage returns STATUS_SUCCESS.

Otherwise, if ReplyBuffer is not NULL, the minifilter driver is put into a wait state as follows:

  • If Timeout is nonzero and the application calls FilterReplyMessage before the Timeout interval expires, the minifilter driver receives the reply, and FltSendMessage returns STATUS_SUCCESS.

  • If Timeout is nonzero and the minifilter driver does not receive a reply before the Timeout interval expires, FltSendMessage returns STATUS_TIMEOUT. (Note: STATUS_TIMEOUT is a success code.)

  • If Timeout is zero when the minifilter driver is waiting for the reply, the minifilter driver is put into a wait state indefinitely. When the application calls FilterReplyMessage, the minifilter driver receives the reply, and FltSendMessage returns STATUS_SUCCESS.

相关文章:

  • 北京网站建设多少钱?
  • 辽宁网页制作哪家好_网站建设
  • 高端品牌网站建设_汉中网站制作
  • 华为HCIP认证H12-831新增变题
  • 基于Netty实现安全认证的WebSocket(wss)服务端
  • 知识分享:隔多久查询一次网贷大数据信用报告比较好?
  • qt for android 重新编译Qt6Android.jar
  • 大整数运算详解升级版
  • 速盾:负载均衡能防ddos攻击吗?
  • 学 Java 具体能干什么?
  • 我的创作纪念日——我与CSDN一起走过的128天
  • 选择排序与堆排序
  • Rust开源Web框架Salvo源码编译
  • Vue中引入组件需要哪三步
  • PostgreSQL的扩展(extensions)-常用的扩展之pg_store_plans
  • Windows系统使用Docker部署Focalboard团队协作工具详细流程
  • 521源码-免费下载-WordPress全能自动采集与发布插件 – WP-AutoPostPro 汉化版
  • Docker搭建mysql性能测试环境
  • iOS | NSProxy
  • JavaScript-Array类型
  • js写一个简单的选项卡
  • LeetCode29.两数相除 JavaScript
  • MYSQL如何对数据进行自动化升级--以如果某数据表存在并且某字段不存在时则执行更新操作为例...
  • Python_网络编程
  • 从0实现一个tiny react(三)生命周期
  • 从地狱到天堂,Node 回调向 async/await 转变
  • 工作踩坑系列——https访问遇到“已阻止载入混合活动内容”
  • 目录与文件属性:编写ls
  • 区块链将重新定义世界
  • 手机app有了短信验证码还有没必要有图片验证码?
  • 数据库写操作弃用“SELECT ... FOR UPDATE”解决方案
  • 用quicker-worker.js轻松跑一个大数据遍历
  • ​Python 3 新特性:类型注解
  • ​如何防止网络攻击?
  • ​一、什么是射频识别?二、射频识别系统组成及工作原理三、射频识别系统分类四、RFID与物联网​
  • #07【面试问题整理】嵌入式软件工程师
  • (八)c52学习之旅-中断实验
  • (保姆级教程)Mysql中索引、触发器、存储过程、存储函数的概念、作用,以及如何使用索引、存储过程,代码操作演示
  • (多级缓存)多级缓存
  • (翻译)Quartz官方教程——第一课:Quartz入门
  • (附表设计)不是我吹!超级全面的权限系统设计方案面世了
  • (一)Linux+Windows下安装ffmpeg
  • (原)Matlab的svmtrain和svmclassify
  • (转)eclipse内存溢出设置 -Xms212m -Xmx804m -XX:PermSize=250M -XX:MaxPermSize=356m
  • ****** 二十三 ******、软设笔记【数据库】-数据操作-常用关系操作、关系运算
  • .bashrc在哪里,alias妙用
  • .NET Micro Framework初体验(二)
  • .NET 表达式计算:Expression Evaluator
  • .NET 程序如何获取图片的宽高(框架自带多种方法的不同性能)
  • .NET/C# 利用 Walterlv.WeakEvents 高性能地定义和使用弱事件
  • .NET6 开发一个检查某些状态持续多长时间的类
  • .NetCore部署微服务(二)
  • @PreAuthorize与@Secured注解的区别是什么?
  • [].slice.call()将类数组转化为真正的数组
  • [AIGC] 使用Curl进行网络请求的常见用法
  • [C puzzle book] types
  • [C++] 小游戏 斗破苍穹 2.11.6 版本 zty出品
  • [C++]二叉搜索树