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


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:

Is it possible to use WCID with the composite parent of a multi-interface device ?

J_BernardJ_Bernard Member Posts: 11

Hello. I am developing a multi-interface device and several applications meant to communicate using libusb. Since there are multiple interfaces and the different apps need to communicate with different interfaces concurrently, I need to use libusbK (perhaps libusb0 would work too, I don't know. But WinUSB doesn't support that)

WCID allows me to ask for the pairing of particular interfaces with a Windows driver. However, I don't see a way to ask it to pair a Windows driver with the composite parent. After all, the Windows extended compatibility descriptor has an interface number in it ! Pairing all interfaces also doesn't automatically pair the parent. Unfortunately, having the composite parent paired to libusbK is exactly what you need to have libusb communicate with the device, and by default it's paired to usbccgp.

I may be able to use libwdi to make the pairing (after all, Zadig can) - it will need to install libusbK if not installed yet anyway - but I figure the cleanest option would be to have the device ask rather than rely on a software solution that will have to ask the user to give it the rights to proceed... So, is it possible to use WCID with the composite parent of a multi-interface device ? And if so, how ?

Thanks, J. Bernard.


  • Tim_RobertsTim_Roberts Member - All Emails Posts: 14,349

    WinUSB certainly does support multiple interfaces simultaneously. If you have the interfaces grouped with an Interface Association Descriptor, then usbccgp.sys will assign them as a set to a single driver. The hardware ID will be that of the first interface in the set (VID_xxxx&PID_yyyy&MI_00).

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

  • J_BernardJ_Bernard Member Posts: 11

    WinUSB supports multiple interfaces simultaneously, but I believe it doesn't support having one process claim interface 0 and a distinct process claim interface 1, which is needed here. My basic libusb code doing that works with libusbK and not with WinUSB. If you have an example that works with WinUSB I'd be happy to see it.

    Thanks for mentionning IAD, I'll look into it, though I would be surprised if opting into it didn't mean giving up on the possibility of having distinct processes use distinct interfaces concurrently, as it seems to group multiple interfaces into one.

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 14,349

    Well, you have the option. If your INF claims the composite device, then all interfaces are assigned to one driver, and you can choose which one to talk to at any given time. If your INFs claim the individual interfaces (...&MI_00, ...&MI_01), then each interface is assigned to a different driver. One or the other. It sounds like you want to have your cake and eat it, too...

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

  • J_BernardJ_Bernard Member Posts: 11
    edited July 17

    I want to claim the individual interfaces as per the 2nd option you're describing, but despite these interfaces being assigned to a specific driver, libusb can't claim them if the composite device isn't assigned to LibusbK.

    What I mean here is that if I have device A, and the driver pairing is as follows:
    {Device A composite parent}: usbccgp
    Device A interface 0: LibusbK
    Device A interface 1: LibusbK

    Applications then can't use the device with libusb. This is the situation I get by using WCID with each individual interface.

    Whereas if I have {Device A composite parent} paired to libusbK with no IAD involved, I can have app A claim interface 0 and app B claim interface 1, and they can use them with libusb. This is what I would like to have, and what I can have by using (having users use) Zadig or embedding driver installation in one of my applications, but I was wondering if the WCID system could do it on its own.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

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 12 September 2022 Live, Online
Internals & Software Drivers 23 October 2022 Live, Online
Kernel Debugging 14 November 2022 Live, Online
Developing Minifilters 5 December 2022 Live, Online