URB structure (usb.h)

The URB structure is used by USB client drivers to describe USB request blocks (URBs) that send requests to the USB driver stack. The URB structure defines a format for all possible commands that can be sent to a USB device.

Syntax

typedef struct _URB {
  union {
#if ...
    _URB_HEADER                                     UrbHeader;
#else
    struct _URB_HEADER                              UrbHeader;
#endif
#if ...
    _URB_SELECT_INTERFACE                           UrbSelectInterface;
#else
    struct _URB_SELECT_INTERFACE                    UrbSelectInterface;
#endif
#if ...
    _URB_SELECT_CONFIGURATION                       UrbSelectConfiguration;
#else
    struct _URB_SELECT_CONFIGURATION                UrbSelectConfiguration;
#endif
#if ...
    _URB_PIPE_REQUEST                               UrbPipeRequest;
#else
    struct _URB_PIPE_REQUEST                        UrbPipeRequest;
#endif
#if ...
    _URB_FRAME_LENGTH_CONTROL                       UrbFrameLengthControl;
#else
    struct _URB_FRAME_LENGTH_CONTROL                UrbFrameLengthControl;
#endif
#if ...
    _URB_GET_FRAME_LENGTH                           UrbGetFrameLength;
#else
    struct _URB_GET_FRAME_LENGTH                    UrbGetFrameLength;
#endif
#if ...
    _URB_SET_FRAME_LENGTH                           UrbSetFrameLength;
#else
    struct _URB_SET_FRAME_LENGTH                    UrbSetFrameLength;
#endif
#if ...
    _URB_GET_CURRENT_FRAME_NUMBER                   UrbGetCurrentFrameNumber;
#else
    struct _URB_GET_CURRENT_FRAME_NUMBER            UrbGetCurrentFrameNumber;
#endif
#if ...
    _URB_CONTROL_TRANSFER                           UrbControlTransfer;
#else
    struct _URB_CONTROL_TRANSFER                    UrbControlTransfer;
#endif
#if ...
    _URB_CONTROL_TRANSFER_EX                        UrbControlTransferEx;
#else
    struct _URB_CONTROL_TRANSFER_EX                 UrbControlTransferEx;
#endif
#if ...
    _URB_BULK_OR_INTERRUPT_TRANSFER                 UrbBulkOrInterruptTransfer;
#else
    struct _URB_BULK_OR_INTERRUPT_TRANSFER          UrbBulkOrInterruptTransfer;
#endif
#if ...
    _URB_ISOCH_TRANSFER                             UrbIsochronousTransfer;
#else
    struct _URB_ISOCH_TRANSFER                      UrbIsochronousTransfer;
#endif
#if ...
    _URB_CONTROL_DESCRIPTOR_REQUEST                 UrbControlDescriptorRequest;
#else
    struct _URB_CONTROL_DESCRIPTOR_REQUEST          UrbControlDescriptorRequest;
#endif
#if ...
    _URB_CONTROL_GET_STATUS_REQUEST                 UrbControlGetStatusRequest;
#else
    struct _URB_CONTROL_GET_STATUS_REQUEST          UrbControlGetStatusRequest;
#endif
#if ...
    _URB_CONTROL_FEATURE_REQUEST                    UrbControlFeatureRequest;
#else
    struct _URB_CONTROL_FEATURE_REQUEST             UrbControlFeatureRequest;
#endif
#if ...
    _URB_CONTROL_VENDOR_OR_CLASS_REQUEST            UrbControlVendorClassRequest;
#else
    struct _URB_CONTROL_VENDOR_OR_CLASS_REQUEST     UrbControlVendorClassRequest;
#endif
#if ...
    _URB_CONTROL_GET_INTERFACE_REQUEST              UrbControlGetInterfaceRequest;
#else
    struct _URB_CONTROL_GET_INTERFACE_REQUEST       UrbControlGetInterfaceRequest;
#endif
#if ...
    _URB_CONTROL_GET_CONFIGURATION_REQUEST          UrbControlGetConfigurationRequest;
#else
    struct _URB_CONTROL_GET_CONFIGURATION_REQUEST   UrbControlGetConfigurationRequest;
#endif
#if ...
    _URB_OS_FEATURE_DESCRIPTOR_REQUEST              UrbOSFeatureDescriptorRequest;
#else
    struct _URB_OS_FEATURE_DESCRIPTOR_REQUEST       UrbOSFeatureDescriptorRequest;
#endif
#if ...
    _URB_OPEN_STATIC_STREAMS                        UrbOpenStaticStreams;
#else
    struct _URB_OPEN_STATIC_STREAMS                 UrbOpenStaticStreams;
#endif
#if ...
    _URB_GET_ISOCH_PIPE_TRANSFER_PATH_DELAYS        UrbGetIsochPipeTransferPathDelays;
#else
    struct _URB_GET_ISOCH_PIPE_TRANSFER_PATH_DELAYS UrbGetIsochPipeTransferPathDelays;
#endif
  };
} URB, *PURB;

Members

UrbHeader

Provides basic information about the request being sent to the host controller driver. For more information, see _URB_HEADER.

UrbSelectInterface

Defines the format of a select interface command for a USB device. For more information, see _URB_SELECT_INTERFACE.

UrbSelectConfiguration

Defines the format of a select configuration command for a USB device. For more information, see _URB_SELECT_CONFIGURATION.

UrbPipeRequest

Defines the format for a command for a pipe in a USB endpoint. For more information, see _URB_PIPE_REQUEST.

UrbFrameLengthControl

Deprecated in Windows 2000 and later operating systems and is not supported by Microsoft. Do not use.

UrbGetFrameLength

Deprecated in Windows 2000 and later operating systems and is not supported by Microsoft. Do not use.

UrbSetFrameLength

Deprecated in Windows 2000 and later operating systems and is not supported by Microsoft. Do not use.

UrbGetCurrentFrameNumber

Defines the format for a command to get the current frame number on a USB bus. For more information, see _URB_GET_CURRENT_FRAME_NUMBER.

UrbControlTransfer

Defines the format for a command to transmit or receive data on a control pipe. For more information, see _URB_CONTROL_TRANSFER.

UrbControlTransferEx

Defines the format for a command to transmit or receive data on a control pipe. For more information, see _URB_CONTROL_TRANSFER_EX.

Defines the format for a command to transmit or receive data on a control pipe.

UrbBulkOrInterruptTransfer

Defines the format for a command to transmit or receive data on a bulk pipe, or to receive data from an interrupt pipe. For more information, see _URB_BULK_OR_INTERRUPT_TRANSFER.

UrbIsochronousTransfer

Defines the format of an isochronous transfer to a USB device. For more information, see _URB_ISOCH_TRANSFER.

UrbControlDescriptorRequest

Defines the format for a command to retrieve or set descriptor(s) on a USB device. For more information, see _URB_CONTROL_DESCRIPTOR_REQUEST.

UrbControlGetStatusRequest

Defines the format for a command to get status from a device, interface, or endpoint. For more information, see _URB_CONTROL_GET_STATUS_REQUEST.

UrbControlFeatureRequest

Defines the format for a command to set or clear USB-defined features on a device, interface, or endpoint. For more information, see _URB_CONTROL_FEATURE_REQUEST.

UrbControlVendorClassRequest

Defines the format for a command to send or receive a vendor or class-specific request on a device, interface, endpoint, or other device-defined target. For more information, see _URB_CONTROL_VENDOR_OR_CLASS_REQUEST.

UrbControlGetInterfaceRequest

Defines the format for a command to get the current alternate interface setting for a selected interface. For more information, see _URB_CONTROL_GET_INTERFACE_REQUEST.

UrbControlGetConfigurationRequest

Defines the format for a command to get the current configuration for a device. For more information, see _URB_CONTROL_GET_CONFIGURATION_REQUEST.

UrbOSFeatureDescriptorRequest

Defines the format for a command to request a Microsoft OS Descriptor. For more information, see _URB_OS_FEATURE_DESCRIPTOR_REQUEST.

UrbOpenStaticStreams

Defines the format for a command to open streams in a bulk endpoint of a USB 3.0 device. For more information, see _URB_OPEN_STATIC_STREAMS and How to Open and Close Static Streams in a USB Bulk Endpoint.

UrbGetIsochPipeTransferPathDelays

Defines the format for a command to retrieve delays associated with isochronous transfer programming in the host controller and transfer completion so that the client driver can ensure that the device gets the isochronous packets in time. For more information, see _URB_GET_ISOCH_PIPE_TRANSFER_PATH_DELAYS.

Remarks

For information about the function codes to set in each structure, see _URB_HEADER.

Requirements

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

See also

IOCTL_INTERNAL_USB_SUBMIT_URB

USB Structures