dionysus77
驱动小牛
驱动小牛
  • 注册日期2006-11-15
  • 最后登录2011-12-18
  • 粉丝0
  • 关注0
  • 积分27分
  • 威望392点
  • 贡献值0点
  • 好评度177点
  • 原创分0分
  • 专家分0分
阅读:1607回复:2

IoBuildSynchronousFsdRequest需要完成并释放irp吗?

楼主#
更多 发布于:2007-04-23 17:30
  为什么在tooflat大侠的代码中没看到对自己的irp进行IoCompleteRequest和IoFreeIrp。请大牛们指点
devia
论坛版主
论坛版主
  • 注册日期2005-05-14
  • 最后登录2016-04-05
  • 粉丝3
  • 关注0
  • 积分1029分
  • 威望712点
  • 贡献值1点
  • 好评度555点
  • 原创分8分
  • 专家分4分
沙发#
发布于:2007-04-23 18:20
1。IoBuildSynchronousFsdRequest产生的IRP最终由IO管理器来负责释放,
     建议你看一篇IFS中的HELP:Rolling Your Own

2。DDK上的文字:
    
    IRPs that are created by IoBuildSynchronousFsdRequest must be completed by a driver's call to IoCompleteRequest. A driver that calls IoBuildSynchronousFsdRequest must not call IoFreeIrp, because the I/O manager frees these synchronous IRPs after IoCompleteRequest has been called.
人总在矛盾中徘徊。。。
dionysus77
驱动小牛
驱动小牛
  • 注册日期2006-11-15
  • 最后登录2011-12-18
  • 粉丝0
  • 关注0
  • 积分27分
  • 威望392点
  • 贡献值0点
  • 好评度177点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2007-04-23 21:27
多谢楼上的,我的ddk怎么写的不一样,
IRPs created using IoBuildSynchronousFsdRequest must be completed by calling IoCompleteRequest and not by merely deallocating the IRP with IoFreeIrp. IoBuildSynchronousFsdRequest queues the IRPs it creates in the IRP queue of the current thread. Freeing these IRPs without completing them might result in a system crash when the thread terminates as the thread attempts to deallocate the IRP's memory.

这些写文档的太不负责了
游客

返回顶部