WDF_USB_DEVICE_SELECT_CONFIG_PARAMS structure (wdfusb.h)
[Applies to KMDF and UMDF]
The WDF_USB_DEVICE_SELECT_CONFIG_PARAMS structure specifies USB device configuration parameters.
Syntax
typedef struct _WDF_USB_DEVICE_SELECT_CONFIG_PARAMS {
ULONG Size;
WdfUsbTargetDeviceSelectConfigType Type;
union {
struct {
PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor;
PUSB_INTERFACE_DESCRIPTOR *InterfaceDescriptors;
ULONG NumInterfaceDescriptors;
} Descriptor;
struct {
PURB Urb;
} Urb;
struct {
UCHAR NumberConfiguredPipes;
WDFUSBINTERFACE ConfiguredUsbInterface;
} SingleInterface;
struct {
UCHAR NumberInterfaces;
PWDF_USB_INTERFACE_SETTING_PAIR Pairs;
UCHAR NumberOfConfiguredInterfaces;
} MultiInterface;
} Types;
} WDF_USB_DEVICE_SELECT_CONFIG_PARAMS, *PWDF_USB_DEVICE_SELECT_CONFIG_PARAMS;
Members
Size
The size, in bytes, of this structure.
Type
A WdfUsbTargetDeviceSelectConfigType-typed value that either specifies the type of configuration that is being selected or indicates that the current configuration is being deconfigured.
Types
Types.Descriptor
Types.Descriptor.ConfigurationDescriptor
If the driver sets the Type member to WdfUsbTargetDeviceSelectConfigTypeInterfacesDescriptor, this member contains a driver-supplied pointer to a USB_CONFIGURATION_DESCRIPTOR structure that specifies a configuration descriptor. If this pointer is NULL, the framework uses the device's first configuration. For more information about selecting a USB configuration, see the Remarks section of WdfUsbTargetDeviceSelectConfig.
Types.Descriptor.InterfaceDescriptors
If the driver sets Type to WdfUsbTargetDeviceSelectConfigTypeInterfacesDescriptor, this member contains a driver-supplied pointer to an array of USB_INTERFACE_DESCRIPTOR structures that represent the interfaces to select for the configuration.
Types.Descriptor.NumInterfaceDescriptors
If the driver sets Type to WdfUsbTargetDeviceSelectConfigTypeInterfacesDescriptor, this member contains the number of elements that are in the interface array that Types.Descriptor.InterfaceDescriptors points to.
Types.Urb
Types.Urb.Urb
If the driver sets Type to WdfUsbTargetDeviceSelectConfigTypeUrb, this member specifies a driver-initialized URB structure that the framework uses to configure the device.
Types.SingleInterface
Types.SingleInterface.NumberConfiguredPipes
If the driver sets Type to WdfUsbTargetDeviceSelectConfigTypeSingleInterface, the framework provides the number of pipes that are configured for the interface.
Types.SingleInterface.ConfiguredUsbInterface
If the driver sets Type to WdfUsbTargetDeviceSelectConfigTypeSingleInterface, the framework provides a handle to a USB interface object that represents the configured interface.
Types.MultiInterface
Types.MultiInterface.NumberInterfaces
If the driver sets Type to WdfUsbTargetDeviceSelectConfigTypeInterfacesPairs, this member specifies the number of elements that are in the Types.MultiInterface.Pairs array.
Types.MultiInterface.Pairs
If the driver sets Type to WdfUsbTargetDeviceSelectConfigTypeInterfacesPairs, this member specifies a pointer to an array of WDF_USB_INTERFACE_SETTING_PAIR structures that identify the interfaces to select.
Types.MultiInterface.NumberOfConfiguredInterfaces
If the driver sets Type to WdfUsbTargetDeviceSelectConfigTypeInterfacesPairs or WdfUsbTargetDeviceSelectConfigTypeMultiInterface, the framework provides the number of interfaces that are configured for the device.
Remarks
The WDF_USB_DEVICE_SELECT_CONFIG_PARAMS structure is used as input to WdfUsbTargetDeviceSelectConfig.
To initialize a WDF_USB_DEVICE_SELECT_CONFIG_PARAMS structure, use one of the following functions:
WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_INIT_DECONFIG
WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_INIT_SINGLE_INTERFACE
WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_INIT_MULTIPLE_INTERFACES
WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_INIT_INTERFACES_DESCRIPTORS
WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_INIT_URB
If the driver sets the Type member to WdfUsbTargetDeviceSelectConfigTypeInterfacesDescriptor, it can change the USB device configuration. All other values use the current USB device configuration.
Requirements
Requirement | Value |
---|---|
Minimum KMDF version | 1.0 |
Minimum UMDF version | 2.0 |
Header | wdfusb.h (include Wdfusb.h) |