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

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.

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).

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.

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…

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.