Windows Driver Kit: Kernel-Mode Driver Framework
WDF_USB_DEVICE_SELECT_CONFIG_PARAMS
The WDF_USB_DEVICE_SELECT_CONFIG_PARAMS structure specifies USB device configuration parameters.
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.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.
- 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.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.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.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 if interfaces that are configured for the device.
Comments
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:
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
Versions: The WDF_USB_DEVICE_SELECT_CONFIG_PARAMS structure is available in version 1.0 and later versions of KMDF.
Headers: Declared in Wdfusb.h. Include Wdfusb.h.
See Also
USB_CONFIGURATION_DESCRIPTOR, USB_INTERFACE_DESCRIPTOR, WDF_USB_INTERFACE_SETTING_PAIR, WdfUsbTargetDeviceSelectConfigType