Communication Bet. Drivers

Hello fellas,

Because I can’t see some certain messages in Upperfilter, I should separate our driver to a upperfilter and a lowerfilter of USB device. So the device stack is like below,

Upper Filter
Existing MS USB Funtion Driver
Lower Filter

What is the best way to communicate between Upper filter and Lower filter driver? (lower filter is doing the actual processing and upper filter is controller of this driver framework )

I am looking forward to seeing your comments.

Good day,

The easiest way to do this is a direct call model where you just call a function with the data you need to process and hand it to the lower filter. Finding the lower filter is a different story. How are you figuring out which role (upper or lower filter) you are implementing in your AddDevice routine? To locate the lower filter from the upper filter, you could send a IRP_MN_QUERY_INTERFACE with a custom GUID/interface. Only the lower filter successfully handles the custom GUID and can return its device object back to the upper filter as a part of the interface.

d