阅读:1292回复:3
这个函数该怎么看的?
oStartNextPacket(PDEV,TRUE);
IoStartNextPacket(PDEV,FALSE); 传入的参数TRUE和FALSE分别表示什么意思? DDK上面的help不是写的很清楚。 够提供一个确切的说法吗? 是不是无论TRUE or False都能移动Irp的指针吗? |
|
沙发#
发布于: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. |
|
板凳#
发布于:2005-04-06 08:28
Cancelable
Specifies whether IRPs in the device queue can be canceled. 不是很清楚了?? 好象跟移动Irp的指针没什么关系吧??? |
|
|
地板#
发布于:2005-04-06 09:18
建议你看一下ifs里osr的一篇讨论cancel IRP的文章。
|
|
|