_URB_SELECT_CONFIGURATION structure (usb.h)

The _URB_SELECT_CONFIGURATION structure is used by client drivers to select a configuration for a USB device.

Syntax

struct _URB_SELECT_CONFIGURATION {
  struct _URB_HEADER            Hdr;
  PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor;
  USBD_CONFIGURATION_HANDLE     ConfigurationHandle;
  USBD_INTERFACE_INFORMATION    Interface;
};

Members

Hdr

Pointer to a _URB_HEADER structure that specifies the URB header information. Hdr.Function must be URB_FUNCTION_SELECT_CONFIGURATION, and Hdr.Length must be the size of the entire URB. Drivers may use the GET_SELECT_CONFIGURATION_REQUEST_SIZE macro defined in usbdlib.h to obtain the size of the URB.

ConfigurationDescriptor

Pointer to an initialized USB configuration descriptor that identifies the configuration to be used on the device. If this member is NULL, the device will be set to an unconfigured state.

ConfigurationHandle

Contains a handle that is used to access this configuration on return from the host controller driver. USB client drivers must treat this member as opaque.

Interface

Specifies a variable length array of USBD_INTERFACE_INFORMATION structures, each describing an interface supported by the configuration being selected.

Before the request is sent to the host controller driver, the driver may select an alternate setting for one or more of the interfaces contained in this array by setting members of the USBD_INTERFACE_INFORMATION structure for that interface.

On return from the host controller driver, this member contains a USBD_INTERFACE_INFORMATION structure with data describing the capabilities and format of the endpoints within that interface.

Remarks

An URB_FUNCTION_SELECT_CONFIGURATION URB consists of a _URB_SELECT_CONFIGURATION structure followed by a sequence of variable-length array of USBD_INTERFACE_INFORMATION structures, each element in the array for each unique interface number in the configuration. Client drivers must allocate enough memory to contain one USBD_PIPE_INFORMATION structure for each endpoint in the selected interfaces.

Drivers can use the USBD_CreateConfigurationRequestEx service routine to allocate the URB.

Other members that are part of this structure but not described here should be treated as opaque and considered to be reserved for system use.

Requirements

Requirement Value
Header usb.h (include Usb.h)

See also

URB

USB Structures

USBD_CreateConfigurationRequestEx

USBD_INTERFACE_INFORMATION

USBD_PIPE_INFORMATION

_URB_HEADER