-/* $Id: irp.c,v 1.42 2002/09/07 15:12:53 chorns Exp $
+/* $Id: irp.c,v 1.43 2002/09/08 10:23:25 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
/* INCLUDES ****************************************************************/
-#include <ntoskrnl.h>
+#include <ddk/ntddk.h>
+#include <internal/io.h>
+#include <internal/ps.h>
+#include <internal/pool.h>
#define NDEBUG
#include <internal/debug.h>
-
/* GLOBALS *******************************************************************/
#define TAG_IRP TAG('I', 'R', 'P', ' ')
Irp->Size = PacketSize;
Irp->StackCount = StackSize;
Irp->CurrentLocation = StackSize;
- Irp->Tail.Overlay.CurrentStackLocation = IoGetSpecificIrpStackLocation(Irp, StackSize);
+ Irp->Tail.Overlay.CurrentStackLocation = &Irp->Stack[(ULONG)StackSize];
}
DPRINT("MajorFunction %d\n", Param->MajorFunction);
DPRINT("DriverObject->MajorFunction[Param->MajorFunction] %x\n",
DriverObject->MajorFunction[Param->MajorFunction]);
- Status = ((PDRIVER_DISPATCH)DriverObject->MajorFunction[Param->MajorFunction])(DeviceObject,
+ Status = DriverObject->MajorFunction[Param->MajorFunction](DeviceObject,
Irp);
return(Status);
}
-#undef IoCallDriver
NTSTATUS
STDCALL
for (i=Irp->CurrentLocation;i<Irp->StackCount;i++)
{
- PIO_STACK_LOCATION IrpSp = IoGetSpecificIrpStackLocation(Irp, i);
- if (IrpSp->CompletionRoutine != NULL)
+ if (Irp->Stack[i].CompletionRoutine != NULL)
{
- Status = IrpSp->CompletionRoutine(IrpSp->DeviceObject,
- Irp,
- IrpSp->Context);
+ Status = Irp->Stack[i].CompletionRoutine(
+ Irp->Stack[i].DeviceObject,
+ Irp,
+ Irp->Stack[i].CompletionContext);
if (Status == STATUS_MORE_PROCESSING_REQUIRED)
{
return;
}
}
- if (IrpSp->Control & SL_PENDING_RETURNED)
+ if (Irp->Stack[i].Control & SL_PENDING_RETURNED)
{
Irp->PendingReturned = TRUE;
}
}
}
-#undef IoCompleteRequest
VOID STDCALL
IoCompleteRequest(PIRP Irp,