// usbdlib.h
PUSB_INTERFACE_DESCRIPTOR USBD_ParseConfigurationDescriptorEx(
[in] PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor,
[in] PVOID StartPosition,
[in] LONG InterfaceNumber,
[in] LONG AlternateSetting,
[in] LONG InterfaceClass,
[in] LONG InterfaceSubClass,
[in] LONG InterfaceProtocol
);
View the official Windows Driver Kit DDI reference
No description available.
The USBD_ParseConfigurationDescriptorEx routine searches a given configuration descriptor and returns a pointer to an interface that matches the given search criteria.
ConfigurationDescriptor
[in]Pointer to a USB configuration descriptor that contains the interface for which to search.
StartPosition
[in]Pointer to the address within the configuration descriptor, provided at ConfigurationDescriptor, to begin searching from. To search from the beginning of the configuration descriptor, the parameters ConfigurationDescriptor and StartPosition must be the same address.
InterfaceNumber
[in]Specifies the device-defined index of the interface to be retrieved. This should be set to -1 if it should not be a search criterion.
AlternateSetting
[in]Specifies the device-defined alternate-setting index of the interface to be retrieved. If the caller does not wish the alternate setting value to be a search criterion, this parameter should be set to -1.
InterfaceClass
[in]Specifies the device- or USB-defined identifier for the interface class of the interface to be retrieved. If the caller does not wish the interface class value to be a search criterion, this parameter should be set to -1.
InterfaceSubClass
[in]Specifies the device- or USB-defined identifier for the interface subclass of the interface to be retrieved. If the caller does not wish the interface subclass value to be a search criterion, this parameter should be set to -1.
InterfaceProtocol
[in]Specifies the device- or USB-defined identifier for the interface protocol of the interface to be retrieved. If the caller does not wish the interface protocol value to be a search criterion, this parameter should be set to -1.
USBD_ParseConfigurationDescriptorEx returns a pointer to the first interface descriptor that matches the given search criteria. If no interface matches the search criteria, it returns NULL.
Callers can specify more than one of the search criteria (InterfaceNumber, AlternateSetting, InterfaceClass, InterfaceSubClass, and InterfaceProtocol) when using this routine to find an interface within a configuration descriptor. For example code, see USBD_CreateConfigurationRequestEx.
When this routine parses the configuration descriptor looking for the interface descriptor that matches the search criteria, it returns the first match, terminating the search. Callers should specify as many search criteria as are necessary to find the desired interface.
USB device driver programming reference