Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV
Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


Different driver on each device instance?

Erik_DabrowskyErik_Dabrowsky Member - All Emails Posts: 26

Until recently I didn't know you could have a different driver loaded for different instances of the same device.
I was under the impression that when windows chose a driver for a device, that driver was used for all instances of the device.

To get it to do this, I right clicked one of the device instances in device manager and selected "update driver" then browsed to the folder where my driver is.
After it updated, I noticed that the other instance of the device was still using the older driver from a different company.

It may sound odd, but this behavior can actually be useful for me in certain cases.

Does anyone know if this is "by design" or just a "happy accident"?

The OS is windows server 2019.

Thanks,
Erik

Comments

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 8,090

    It’s by design.

    Consider: What is the definition of “the same device”?

    Device instances are reported by the bus driver using a set of strings referred to as the Hardware ID. Device instances can differ by one element of the Hardware ID and therefore cause different drivers to be loaded.

    So, yup... definitely by design.

    Peter

    Peter Viscarola
    OSR
    @OSRDrivers

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,627

    It's not really that surprising, is it? The system will load whatever driver matches at the point in time when the device ID surfaces. If you go restart the second device, it would get the new driver as well, but until then, it will keep using whatever driver had originally been loaded.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • Doron_HolanDoron_Holan Member - All Emails Posts: 10,525

    A regular pnp restart (or system reboot) is not the trigger to reload the new driver. When you ask pnp to reevaluate (update driver, pnputil, etc) the best driver match for the device, the new driver (if it is the best match) will now load on the second instance. When pnputil and devcon install a driver package, they tell pnp to reevaluate all applicable devices.

    d
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Writing WDF Drivers 7 Dec 2020 LIVE ONLINE
Internals & Software Drivers 25 Jan 2021 LIVE ONLINE
Developing Minifilters 8 March 2021 LIVE ONLINE