UsbControlRequestType UsbControlRequestType UsbControlRequestType UsbControlRequestType Class

Provides information about the USB control transfer, the type of control request, whether the data is sent from or to the host, and the recipient of the request in the device.

Syntax

Declaration

public sealed class UsbControlRequestTypepublic sealed class UsbControlRequestTypePublic NotInheritable Class UsbControlRequestTypepublic sealed class UsbControlRequestType

Constructors summary

Creates a UsbControlRequestType object.

Properties summary

Gets or sets the bmRequestType value as a byte.

Gets or sets the type of USB control transfer: standard, class, or vendor.

Gets or sets the direction of the USB control transfer.

Gets or sets the recipient of the USB control transfer.

Constructors

  • UsbControlRequestType()
    UsbControlRequestType()
    UsbControlRequestType()
    UsbControlRequestType()

    Creates a UsbControlRequestType object.

    public UsbControlRequestType()public New()Public Sub New()public UsbControlRequestType()

Properties

  • AsByte
    AsByte
    AsByte
    AsByte

    Gets or sets the bmRequestType value as a byte.

    public byte AsByte { get; set; }public byte AsByte { get; set; }Public ReadWrite Property AsByte As bytepublic byte AsByte { get; set; }

    Property Value

    • byte
      byte
      byte
      byte

      The entire bmRequestType value in a byte.

    Remarks

    If the hardware specification for the device defines the bmRequestType field value to be sent as a byte, you can use the AsByte property. Otherwise, you must individually get or set bmRequestType values, such as direction, type, and recipient by using ControlTransferType, Direction, and Recipient properties, respectively.

  • ControlTransferType
    ControlTransferType
    ControlTransferType
    ControlTransferType

    Gets or sets the type of USB control transfer: standard, class, or vendor.

    public UsbControlTransferType ControlTransferType { get; set; }public UsbControlTransferType ControlTransferType { get; set; }Public ReadWrite Property ControlTransferType As UsbControlTransferTypepublic UsbControlTransferType ControlTransferType { get; set; }

    Property Value

  • Direction
    Direction
    Direction
    Direction

    Gets or sets the direction of the USB control transfer.

    public UsbTransferDirection Direction { get; set; }public UsbTransferDirection Direction { get; set; }Public ReadWrite Property Direction As UsbTransferDirectionpublic UsbTransferDirection Direction { get; set; }

    Property Value

  • Recipient
    Recipient
    Recipient
    Recipient

    Gets or sets the recipient of the USB control transfer.

    public UsbControlRecipient Recipient { get; set; }public UsbControlRecipient Recipient { get; set; }Public ReadWrite Property Recipient As UsbControlRecipientpublic UsbControlRecipient Recipient { get; set; }

    Property Value

    Remarks

    If the recipient is the first interface of the active configuration (DefaultInterface ), SendControlInTransferAsync(UsbSetupPacket) and SendControlOutTransferAsync(UsbSetupPacket) methods overwrite the low byte of Index with the interface number of the default interface.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.DualApiPartitionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute

Details

Assembly

Windows.Devices.Usb.dll