iocpleterequest的目的是什么?

发布于 2025-01-25 16:31:55 字数 145 浏览 0 评论 0原文

为什么许多设备驱动程序都有iocosterequest(irp,io_no_increment);在调度例程结束时?我阅读了iocompleterequest函数的相应的Microsoft文档,但我不太了解这些概念。

Why do many device drivers have an IoCompleteRequest(irp,IO_NO_INCREMENT); at the end of the dispatch routines? I read the corresponding Microsoft docs for the IoCompleteRequest function, but I didn't understand very well those concepts.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

从来不烧饼 2025-02-01 16:31:55

首先,您需要了解IRP的生命周期。如何创建IRP(IOAllocateIRP),交付(Iocalldriver)并在下班后发布(iofreeirp)。
其次,如有必要,在操作结束时需要进行后处理时,还以驱动程序层次结构方式处理I/O完成例程的处理。
iocpleterequest可以确保这两件事。

  1. 应用程序执行I/O请求。
  2. I/O Manager(创建IRP,传递给驱动程序)
  3. 驱动程序(在处理作业后完成IRP(IRP))
  4. I/O Manager(Release IRP,将结果,将结果传输到上限应用程序)
  5. 将接收I/O结果。

First, you need to understand the lifecycle of an IRP. How the IRP is created (IoAllocateIrp), delivered (IoCallDriver), and released (IoFreeIrp) after work is done.
Second, if necessary, when post-processing is required at the end of the operation, the processing of the I/O completion routine is also handled in the driver hierarchical manner.
IoCompleteRequest does the job of ensuring these two things.

  1. Application performs an I/O request.
  2. I/O Manager (create IRP, pass to driver)
  3. Driver (IRP complete after processing the job (IoCompleteRequest))
  4. I/O Manager (Release IRP, transfer result to upper application)
  5. The application receives the I/O result.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文