Hello,
can I rely on IopInvalidDeviceRequest to fail all IRPs I did not supply dispatch routines for?
I want to fail a few IRP_MJ_*s and my dispatch routines basically do what IopInvalidDeviceRequest does, so I could save them, couldn’t I?
Hello,
can I rely on IopInvalidDeviceRequest to fail all IRPs I did not supply dispatch routines for?
I want to fail a few IRP_MJ_*s and my dispatch routines basically do what IopInvalidDeviceRequest does, so I could save them, couldn’t I?
Yes. If you do not support an IRP_MJ_* class of IRPs, just don’t set a dispatch routine entry for it in your DriverObject and the OS will do the right thing for it.
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-303560-
xxxxx@lists.osr.com] On Behalf Of xxxxx@hushmail.com
Sent: Thursday, October 18, 2007 3:48 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] IopInvalidDeviceRequestHello,
can I rely on IopInvalidDeviceRequest to fail all IRPs I did not supply
dispatch routines for?I want to fail a few IRP_MJ_*s and my dispatch routines basically do
what IopInvalidDeviceRequest does, so I could save them, couldn’t I?
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminarsTo unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Why don’t you want just to leave corresponding entries in a DRIVER_OBJECT alone??? As long as you haven’t registered a handler for a particular request in your driver, the OS is not going to send requests of a given type to it. The only exception is the situation when you want to fail the request with some certain predefined status (for example, STATUS_ACCESS_DENIED for IRP_MJ_CREATE handler) - in this case you would have to register a handler that fails IRP with the status of your choice. However, as long as you don’t care about failure status, just leave corresponding entries in a DRIVER_OBJECT alone, and that’s it…
Anton Bassov