The required functionality of a particular Dispatch routine varies, depending on the IRP_MJ_XXX it handles, on the individual driver’s level in a chain of NT drivers, and on the type of underlying physical device.
Basically, most Dispatch routines process incoming IRPs as follows:
Whether an NT driver must check its I/O stack location to determine what to do and to check parameters depends on the given IRP_MJ_XXX, as well as on whether that driver set up a separate Dispatch routine for each IRP_MJ_XXX that the driver handles.
Whether an NT driver must pass on an IRP for further processing depends on the validity of the parameters, if any, as well as on the IRP_MJ_XXX and on the driver’s level, if any, in a chain of layered drivers.