I want to add some functionality to a device stack by providing an upper filter driver.
The driver would register a device interface with a special reference string.
An app would find and open the device by that device interface/string, and the filter would look for the reference string in the FILE_OBJECT’s Name to recognize that the app wants the added functionality.
Then the filter would handle/complete the create request and all other requests sent to that FILE_OBJECT without passing them down.
However, the rest of the requests it would pass down without touching them.
In other words, it would completely own some file objects and let the downstrean drivers handle the rest.
I’m reading the “Framework File Objects” and related topics in WDK and can’t understand how exactly I should setup the WDF_FILEOBJECT_CONFIG for my filter to arrange what I need…
Specifically, the documentation of AutoForwardCleanupClose makes it look like I can either have all cleanups and closes passed down or completed in my driver, which is not what I need.
You are correct, KMDF always forwards create/cleanup/close or does not. There is no way to selectively alter this based on the file object (actually you can for create, just not for cleanup and close). Typically filters do not layer a namespace on top of the FDO, they either enumerate a raw PDO or create a control device to create the side band channel. If you really want to keep the filter with outadditional device objects, you could register preprocess routnes MJ_CREATE/CLEANUP/CLOSE and run your selective logic there.
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@yahoo.com
Sent: Thursday, February 24, 2011 10:02 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] KMDF: Filtering create, cleanup and close requests
I want to add some functionality to a device stack by providing an upper filter driver.
The driver would register a device interface with a special reference string.
An app would find and open the device by that device interface/string, and the filter would look for the reference string in the FILE_OBJECT’s Name to recognize that the app wants the added functionality.
Then the filter would handle/complete the create request and all other requests sent to that FILE_OBJECT without passing them down.
However, the rest of the requests it would pass down without touching them.
In other words, it would completely own some file objects and let the downstrean drivers handle the rest.
I’m reading the “Framework File Objects” and related topics in WDK and can’t understand how exactly I should setup the WDF_FILEOBJECT_CONFIG for my filter to arrange what I need…
Specifically, the documentation of AutoForwardCleanupClose makes it look like I can either have all cleanups and closes passed down or completed in my driver, which is not what I need.
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
Thank you for quick reply. Why doesn’t KMDF allow that? Creating additional device objects seems like a hassle. Is there some problem with “layering a namespace on top of the FDO” KMDF tries to avoid this way?
From what I understand, if I use the preprocess routines, I wouldn’t be synchronized with PnP and Power, would I?
Nothing we are trying to avoid, it is nit a common enough scenario to support in the framework. You don’t lose anything with preprocessing create, cleanup and close, they are not synchronized with pnp and power by kmdf
d
dent from a phine with no keynoard
-----Original Message-----
From: xxxxx@yahoo.com
Sent: Thursday, February 24, 2011 10:27 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] KMDF: Filtering create, cleanup and close requests
Thank you for quick reply. Why doesn’t KMDF allow that? Creating additional device objects seems like a hassle. Is there some problem with “layering a namespace on top of the FDO” KMDF tries to avoid this way?
From what I understand, if I use the preprocess routines, I wouldn’t be synchronized with PnP and Power, would I?
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer