none
Can KMDF driver modify the Windows registry within another driver's software key? RRS feed

  • Question

  • Dear Microsoft experts:

    As i knows, KMDF driver can create and write the Windows registry within its software key by using WdfDeviceOpenRegistryKey.

    Is it possible to modify another driver's software key by using the framework function or something else?

    Because WdfDeviceOpenRegistryKey requires a framework device object as its parameter, can we obtain another driver's framework device object?

    Thanks a lot.

    Sincerely, 

    Zale Yu

    Friday, November 27, 2015 8:59 AM

Answers

  • First ask be sure you want to modify another driver's key, most drivers assume they are the owners of this data.  Second, remember that KMDF drivers are not restricted to just WdfXXX calls.  It is recommended you use the WdfXXX calls whenever possible, but you can use the registry calls from WDM which can access the whole registry tree.  So yes a KMDF driver can modify another driver's keys, but be careful and be sure there is not a better way.


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    Friday, November 27, 2015 12:15 PM

All replies

  • First ask be sure you want to modify another driver's key, most drivers assume they are the owners of this data.  Second, remember that KMDF drivers are not restricted to just WdfXXX calls.  It is recommended you use the WdfXXX calls whenever possible, but you can use the registry calls from WDM which can access the whole registry tree.  So yes a KMDF driver can modify another driver's keys, but be careful and be sure there is not a better way.


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    Friday, November 27, 2015 12:15 PM
  • WDF objects are only valid for the driver that created them, the behavior is not defined if you use another driver's wdf handles in your own calls.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Monday, November 30, 2015 6:11 AM