iocpleterequest的目的是什么?
为什么许多设备驱动程序都有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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,您需要了解IRP的生命周期。如何创建IRP(IOAllocateIRP),交付(Iocalldriver)并在下班后发布(iofreeirp)。
其次,如有必要,在操作结束时需要进行后处理时,还以驱动程序层次结构方式处理I/O完成例程的处理。
iocpleterequest可以确保这两件事。
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.