能力值:
( LV5,RANK:60 )
|
-
-
2 楼
iocalldriver内部会先下移一个单位irpsp
|
能力值:
( LV6,RANK:90 )
|
-
-
3 楼
楼上所言极是
算了,没多少人感兴趣,终结此帖
红色部分是此问题关键所在
IoAllocateIrp(IN CCHAR StackSize,
IN BOOLEAN ChargeQuota)
{
....
IoInitializeIrp(Irp, Size, StackSize);
IoInitializeIrp(IN PIRP Irp,
IN USHORT PacketSize,
IN CCHAR StackSize)
{
/* Clear it */
IOTRACE(IO_IRP_DEBUG,
"%s - Initializing IRP %p\n",
__FUNCTION__,
Irp);
RtlZeroMemory(Irp, PacketSize);
/* Set the Header and other data */
Irp->Type = IO_TYPE_IRP;
Irp->Size = PacketSize;
Irp->StackCount = StackSize;
[COLOR="Red"]Irp->CurrentLocation = StackSize + 1[/COLOR];
IofCallDriver(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
PDRIVER_OBJECT DriverObject;
PIO_STACK_LOCATION StackPtr;
DriverObject = DeviceObject->DriverObject;
Irp->CurrentLocation--;
|
|
|