Hello. There are 2 default dispatch routines I've come across, either complete the IRP via IoCompleteRequest() and go back up the device stack, or ignore the IRP and call the lower driver via IoCallDriver().
I currently iterate over IRP_MJ_MAXIMUM_FUNCTION, in the classic for loop, and assign all IRP_MJ_XX to DefaultDispatchHandler(), and do:
Irp->IoStatus.Information = 0; Irp->IoStatus.Status = STATUS_NOT_SUPPORTED; IoCompleteRequest(Irp, IO_NO_INCREMENT); return STATUS_NOT_SUPPORTED;
Microsoft samples, some return STATUS_INVALID_DEVICE_REQUEST (but that's the default return with a NULL handler by the I/O manager), I've seen some return STATUS_SUCCESS. And I've read the Walter Oney book on the IRP section, and it says the default handler should use IoCallDriver() in the default dispatch routine, but it's around the filter driver section so I assume it's just relating to them, of which I'm not. As I'm the only device driver in this PNP stack (mydriver=FDO, ACPI=PDO), there's no point me in ever checking if someone is below me right and always completing. And what does the I/O manager do in response to seeing STATUS_NOT_SUPPORTED, or what should I use.
!DevObj !DrvObj !DevExt ObjectName > ffff940be529d6b0 \Driver\mydriver ffff940be529d800 ffff940be98f2e10 \Driver\ACPI ffff940be6ea5560 00000083 !DevNode ffff940be55485a0 : DeviceInst is "ACPI\aaaaaaaa\0&bbbbbbb&0" ServiceName is "cccccccc"
It looks like you're new here. If you want to get involved, click one of these buttons!
|Upcoming OSR Seminars||Kernel Debugging||30 Mar 2020||OSR Seminar Space|
|Writing WDF Drivers||13 April 2020||OSR Seminar Space & ONLINE|
|Developing Minifilters||20 Apr 2020||OSR Seminar Space & ONLINE|
|Internals & Software Drivers||TBD||Dulles, VA|