get "driver keys " data under class reg key

hi

how i can access " driver keys " info that are on HKLM\SYSTEM\CurrentControlSet\Control sub key in filter driver adddevice routine without registry function
like how we get " HKLM\SYSTEM\CurrentControlSet\Enum " info with IoGetDeviceProperty

xxxxx@gmail.com wrote:

how i can access " driver keys " info that are on HKLM\SYSTEM\CurrentControlSet\Control sub key in filter driver adddevice routine without registry function

You can’t. They’re registry keys. Use the registry APIs. That’s what
they are for.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

when i want access to it on my filter driver AddDevice that reg sub key is not available

but i can get it in other routine latter ( it take some time for system to add this key i think )

how i solve it?

xxxxx@gmail.com wrote:

when i want access to it on my filter driver AddDevice that reg sub key is not available

but i can get it in other routine latter ( it take some time for system to add this key i think )

how i solve it?

You wait. If you are an upper filter, you get called before the
function driver has been called.

What do you need from the Control key?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

in some device class we have subclass for example Image class have sunclass of ( scaner - camera ,…)
so i see this subclass is set in this reg key and my AddDevice can check it and if it was prefer subclass then attach to it

you say i change it to lower filter ?

That’s typically not the best approach.

Rather, attach to every device in the class you’re filtering. THEN, later, when the function driver is ready, read the registry and determine whether the device is the sub-class you’re interested it. If it is, you start filtering. If it’s not, you simply “pass through” the requests sent to your driver (simple code, WdfRequestFormatUsingCurrentRequest and WdfRequestSend with SEND_AND_FORGET).

Peter
OSR

so i some case if i attach to device ( even pass through upper filter driver ) it stop work + interference with MTP software
so i want know it was possible to attach to device after adddevice called? ( in time i can be determine subclass of device ? )

xxxxx@gmail.com wrote:

so i some case if i attach to device ( even pass through upper filter driver ) it stop work + interference with MTP software

That would only be true if your filter was broken. A true pass-through
filter will not interfere with MTP software.

so i want know it was possible to attach to device after adddevice called? ( in time i can be determine subclass of device ? )

Not reliably, no. It is only possible to attach to the top of a device
stack, so if any other drivers got attached, then you would be stuck.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.