Usb​Control​Request​Type Usb​Control​Request​Type Usb​Control​Request​Type Class

Definition

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.

public sealed class UsbControlRequestType : IUsbControlRequestTypepublic sealed class UsbControlRequestType : IUsbControlRequestTypePublic NotInheritable Class UsbControlRequestType Implements IUsbControlRequestType
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Constructors

UsbControlRequestType() UsbControlRequestType() UsbControlRequestType()

Creates a UsbControlRequestType object.

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

Properties

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 byte
Value
byte byte byte

The entire bmRequestType value in a byte.

Attributes

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

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 UsbControlTransferType
Value
UsbControlTransferType UsbControlTransferType UsbControlTransferType

The type of USB control transfer: standard, class, or vendor.

Attributes

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 UsbTransferDirection
Value
UsbTransferDirection UsbTransferDirection UsbTransferDirection

The direction of the USB control transfer.

Attributes

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 UsbControlRecipient
Value
UsbControlRecipient UsbControlRecipient UsbControlRecipient

The recipient of the USB control transfer.

Attributes

Remarks

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