阅读:2039回复:0
在 IRP_MJ_SCSI 下可否更改 Irp->MdlAddress
請問各位高手
我寫一個 USB lower filter 我在 IRP_MJ_SCSI 下 判斷是 if ( wFunction == URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER ) { struct _URB_BULK_OR_INTERRUPT_TRANSFER *pBulkOrInterruptTransfer = (struct _URB_BULK_OR_INTERRUPT_TRANSFER *) pUrb; if ( pBulkOrInterruptTransfer->TransferBufferLength == 0x1F ) { ... if ( COMMAND is SCSI_READ && Length = 0x20000 ) { pdx->Buffer1 = (PUCHAR) ExAllocatePoolWithTag(NonPagedPool, 0x20000,'LaNg'); pdx->newMDL1 = IoAllocateMdl( (PVOID)pdx->Buffer1 , 0x20000, FALSE , FALSE , (PIRP) NULL ); MmBuildMdlForNonPagedPool(pdx->newMDL1); pdx->orgMDL1 = Irp->MdlAddress ; Irp->MdlAddress = pdx->newMDL1; } } } 這樣改 MDL Address 就會出現 BlueScreen 0x0000012E |
|