Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results
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/
I have a device that does not have a serial number. As a result, whenever I connect the device to a new USB port, Windows identifies it as a new device and assigns it a generic friendly name such as 'My Device', 'My Device #2', 'My Device #3', and so on. This occurs before the IRP_MN_START_DEVICE event, and a registry subkey is created during this process.
To address this issue, I have written a dispatch routine for IRP_MN_START_DEVICE. In this routine, I delete the registry key when the device is connected to a different port from the previous one. To ensure that the correct registry subkey is created and that Windows can accurately detect the device, I need to restart the IRP process.
Can I do that or do you have a better idea?
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! | ||
Internals & Software Drivers | 19-23 June 2023 | Live, Online |
Writing WDF Drivers | 10-14 July 2023 | Live, Online |
Kernel Debugging | 16-20 October 2023 | Live, Online |
Developing Minifilters | 13-17 November 2023 | Live, Online |
Comments
Yes. Give your devices a serial number, like you are supposed to. It's not hard.
Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.
Thanks dear Tim_Roberts.
Could you please give a hint how and which data structure need to work with.
It's in your device's firmware. What USB chip are you using?
Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.
I have recently developed just an upper minifilter to manage all connected devices to the operating system, including the third-party device I mentioned earlier. I do not intend to modify the device.
The information extracted includes the PID and VID of the device, which identifies it as an "Ethernet (RNDIS and CDC ethernet)".
If it's not your device, then why do you care at all that the friendly name changes? It's the vendor's problem, not yours.
Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.
I bind the device to an external virtual switch in hyper-v (which is based on friendly name). I don't want to change the config on every usb connection.