[Q] Why USBD_CreateCfgReqEx() results in failing URB unless I configure *all* interfaces?

The documentation for USBD_CreateConfigurationRequestEx() implies that I may
pass, via the ‘InterfaceList’ parameter, just the interface(s) I wish to
enable (leaving any other interfaces “disabled”).

For example, assume a device has two interfaces, but I only want to enable
one of them. According to the documentation, I should be able to do so by
passing *just* the interface desired when calling
USBD_CreateConfigurationRequestEx().

While such a configuration URB is apparently created successfully
(USBD_CreateConfigurationRequestEx() returns non-NULL and the URB seems to
be filled-out as expected), submitting that URB in order to actually enable
the desired interface always returns STATUS_INVALID_PARAMETER.

However, if I pass *both* interfaces when calling
USBD_CreateConfigurationRequestEx(), the URB is created successfully *and*
submitting it returns STATUS_SUCCESS. For my particular device, though,
enabling both interfaces will not actually work correctly (for reasons not
worth going into here, it turns out that I *must* only enable one of the
interfaces).

Why do I get STATUS_INVALID_PARAMETER when I try to enable one interface,
but not both? How do you enable *only* desired interface(s)?

  • Matt