lhzh114
驱动牛犊
驱动牛犊
  • 注册日期2004-02-20
  • 最后登录2008-12-27
  • 粉丝0
  • 关注0
  • 积分9分
  • 威望37点
  • 贡献值0点
  • 好评度11点
  • 原创分0分
  • 专家分0分
阅读:1151回复:3

奇怪,sfilter 中内容 和 ddk doc内容?

楼主#
更多 发布于:2005-01-26 22:00
sfilter.c 中 SfCreateCompletion 完成历程:
    if (NULL != event)  {

        KeSetEvent(event, IO_NO_INCREMENT, FALSE);
    }

     if (Irp->PendingReturned) {

        IoMarkIrpPending( Irp );
    }

而在ifs kit 2003文档中:
Using IRP Completion Routines
→→Constraints on Completion Routines下:
Unless the completion routine signals an event, it must check the Irp->PendingReturned flag. If this flag is set, the completion routine must call IoMarkIrpPending to mark the IRP as pending.

If a completion routine signals an event, it should not call IoMarkIrpPending

请高人解惑!
lhzh114
驱动牛犊
驱动牛犊
  • 注册日期2004-02-20
  • 最后登录2008-12-27
  • 粉丝0
  • 关注0
  • 积分9分
  • 威望37点
  • 贡献值0点
  • 好评度11点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2005-01-27 15:59
是这样,多谢tooflat!

But:

If a completion routine signals an event, it should not call

如果完成历程 signal event,就不应该call IoMarkIrpPending

怎磨在 CompletionRoutine() 先signal event 后又 IoMarkIrpPending( Irp );

我的理解有问题吗? :D
游客

返回顶部