limee
驱动牛犊
驱动牛犊
  • 注册日期2004-03-02
  • 最后登录2006-07-25
  • 粉丝0
  • 关注0
  • 积分10分
  • 威望2点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1292回复:3

这个函数该怎么看的?

楼主#
更多 发布于:2005-04-05 20:24
oStartNextPacket(PDEV,TRUE);
IoStartNextPacket(PDEV,FALSE);
传入的参数TRUE和FALSE分别表示什么意思?
DDK上面的help不是写的很清楚。
够提供一个确切的说法吗?

是不是无论TRUE or False都能移动Irp的指针吗?
KMK
KMK
驱动大牛
驱动大牛
  • 注册日期2001-09-12
  • 最后登录2017-10-06
  • 粉丝2
  • 关注0
  • 积分42分
  • 威望404点
  • 贡献值2点
  • 好评度58点
  • 原创分1分
  • 专家分1分
  • 社区居民
沙发#
发布于:2005-04-05 21:40
IoStartNextPacket
The IoStartNextPacket routine dequeues the next IRP, if any, from the given device object\'s associated device queue and calls the driver\'s StartIo routine.
VOID
  IoStartNextPacket(
    IN PDEVICE_OBJECT  DeviceObject,
    IN BOOLEAN  Cancelable
    );


Parameters
DeviceObject
Pointer to the device object for which the IRP is to be dequeued.
Cancelable
Specifies whether IRPs in the device queue can be canceled.

Return Value
None

Headers
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.

Comments
If there are no IRPs currently in the device queue for the target DeviceObject, this routine simply returns control to the caller.

If the driver passed a pointer to a cancel routine when it called IoStartPacket, it should pass TRUE in the Cancelable parameter. If Cancelable is TRUE, the I/O manager will use the cancel spin lock to protect the device queue and the current IRP.

Drivers that do not have a StartIo routine cannot call IoStartNextPacket.

Callers of IoStartNextPacket must be running at IRQL = DISPATCH_LEVEL. Usually, this routine is called from a device driver\'s DpcForIsr or CustomDpc routine, both of which are run at IRQL =DISPATCH_LEVEL.

wowocock
VIP专家组
VIP专家组
  • 注册日期2002-04-08
  • 最后登录2016-01-09
  • 粉丝16
  • 关注2
  • 积分601分
  • 威望1651点
  • 贡献值1点
  • 好评度1227点
  • 原创分1分
  • 专家分0分
板凳#
发布于:2005-04-06 08:28
Cancelable
Specifies whether IRPs in the device queue can be canceled.
不是很清楚了??
好象跟移动Irp的指针没什么关系吧???
花开了,然后又会凋零,星星是璀璨的,可那光芒也会消失。在这样 一瞬间,人降生了,笑者,哭着,战斗,伤害,喜悦,悲伤憎恶,爱。一切都只是刹那间的邂逅,而最后都要归入死亡的永眠
idaxsy
驱动大牛
驱动大牛
  • 注册日期2004-12-09
  • 最后登录2006-03-17
  • 粉丝0
  • 关注0
  • 积分386分
  • 威望54点
  • 贡献值0点
  • 好评度8点
  • 原创分0分
  • 专家分0分
地板#
发布于:2005-04-06 09:18
建议你看一下ifs里osr的一篇讨论cancel IRP的文章。
[b]万水千山总是情,回个帖子行不行?[/b]
游客

返回顶部