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/


Create driver interface using hardware ID

KmdfDevKmdfDev Member Posts: 2

I'm hoping to get a little insight on how driver interfaces are generated in WDF.

I have a driver based on avshws:
https://github.com/microsoft/Windows-driver-samples/tree/master/avstream/avshws

The issue I'm facing is that I require the driver interface to path to contain the hardware ID of my device.
Right now the interface when created is simply \?\ROOT#IMAGE#0000#{e5323777-f976-4f5b-9b55-b94699c46e44}\GLOBAL showing that it is a KSCATEGORY_VIDEO_CAMERA interface, which is good, but I need the hardware ID in the path, such as:
\?\ROOT#IMAGE#my_hardware_id#{e5323777-f976-4f5b-9b55-b94699c46e44}\GLOBAL

Any help is much appreciated.

Comments

  • Doron_HolanDoron_Holan Member - All Emails Posts: 10,503

    what bigger problem are you trying to solve? the format of the device interface is opaque (and subject to change) and you should not be parsing it for sub strings. You can query for properties (including the hardware IDs) from a device interface string instance

    d
  • KmdfDevKmdfDev Member Posts: 2

    The main problem is that it is being accessed from a UWP application and it filters the devices based on the hardware ID from the interface path. Unfortunately, it's a third party I'm integrating with and I can't control how they are filtering the devices.

    One other note, I have been toying with this idea using the vhidmini2 sample driver, since I'm more familiar with HID devices.
    When I create the device using it's standard implementation I get a device interface such as: \?\HID#HIDCLASS...col1{4D1E55B2-F16F-11CF-88CB-001111000030}
    But if I remove that device and implement a VHF device then the device interface path is more to what I'm expecting:
    \?\HID#my_hardware_id...col1{4D1E55B2-F16F-11CF-88CB-001111000030}

    Even with the standard vhidmini2 sample I have not been able to do this as of yet but trying to understand why VHF can do it.

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!
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 15 Jun 2020 LIVE ONLINE
Writing WDF Drivers 22 June 2020 LIVE ONLINE
Internals & Software Drivers 28 Sept 2020 Dulles, VA