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/


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

OSR_Community_UserOSR_Community_User Member Posts: 110,217
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
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!
Kernel Debugging 30 January 2023 Live, Online
Developing Minifilters 20 March 2023 Live, Online
Writing WDF Drivers TBD 2023 Live, Online
Internals & Software Drivers 17 April 2023 Live, Online