Expand Minimize

WDF_USB_DEVICE_SELECT_CONFIG_PARAMS structure

[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
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.

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.

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.

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.

SingleInterface
NumberConfiguredPipes

If the driver sets Type to WdfUsbTargetDeviceSelectConfigTypeSingleInterface, the framework provides the number of pipes that are configured for the interface.

ConfiguredUsbInterface

If the driver sets Type to WdfUsbTargetDeviceSelectConfigTypeSingleInterface, the framework provides a handle to a USB interface object that represents the configured interface.

MultiInterface
NumberInterfaces

If the driver sets Type to WdfUsbTargetDeviceSelectConfigTypeInterfacesPairs, this member specifies the number of elements that are in the Types.MultiInterface.Pairs array.

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.

NumberOfConfiguredInterfaces

If the driver sets Type to WdfUsbTargetDeviceSelectConfigTypeInterfacesPairs or WdfUsbTargetDeviceSelectConfigTypeMultiInterface, the framework provides the number if 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

Minimum KMDF version

1.0

Minimum UMDF version

2.0

Header

Wdfusb.h (include Wdfusb.h)

See also

USB_CONFIGURATION_DESCRIPTOR
USB_INTERFACE_DESCRIPTOR
WDF_USB_INTERFACE_SETTING_PAIR
WdfUsbTargetDeviceSelectConfigType

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft