阅读:898回复:2
如何拷备一份当前的Irp并发送到下层的驱动去??
如何拷备一份当前的Irp并发送到下层的驱动去??
PIRP I; ////I为需要拷贝的Irp. CCHAR c = m_TargetDevice->StackRequirement() ; PIRP Irp = KIrp::Allocate(c+1); ///----是否需要加一??? IoSetNextIrpStackLocation(m_queIrp); *Irp = *I; -----是否这样??? IoSetCompletionRoutine(Irp,WaitMastIrpComplete, this, TRUE, TRUE, false); IoSetCancelRoutine(Irp,CanelIrp); IoMarkIrpPending(Irp); status = IoCallDriver(m_TargetDevice->DeviceObject(),Irp); ------------------ 这样代码对吗?? 我这样做,程序老崩!! |
|
|
沙发#
发布于:2004-08-10 12:15
help , please!
|
|
|
板凳#
发布于:2004-08-11 15:04
if you just want to call the lower DO, just copy down.
if you want to call a DO in another stack, why don't you set up the params in the stack location of the new IRP? those params you copied is for the old stack not for the new one. |
|
|