UsbControlRequestType UsbControlRequestType UsbControlRequestType UsbControlRequestType 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 : IUsbControlRequestType
public sealed class UsbControlRequestType : IUsbControlRequestType
Public NotInheritable Class UsbControlRequestType Implements IUsbControlRequestType
var usbControlRequestType = new usbControlRequestType();
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Constructors

UsbControlRequestType() UsbControlRequestType() UsbControlRequestType() UsbControlRequestType()

Creates a UsbControlRequestType object.

public : UsbControlRequestType()
public UsbControlRequestType()
Public Sub New()
var usbControlRequestType = new 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 byte
var byte = usbControlRequestType.asByte;
usbControlRequestType.asByte = byte;
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 UsbControlTransferType
var usbControlTransferType = usbControlRequestType.controlTransferType;
usbControlRequestType.controlTransferType = usbControlTransferType;
Value
UsbControlTransferType UsbControlTransferType UsbControlTransferType UsbControlTransferType

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

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 UsbTransferDirection
var usbTransferDirection = usbControlRequestType.direction;
usbControlRequestType.direction = usbTransferDirection;
Value
UsbTransferDirection UsbTransferDirection UsbTransferDirection UsbTransferDirection

The direction of the USB control transfer.

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 UsbControlRecipient
var usbControlRecipient = usbControlRequestType.recipient;
usbControlRequestType.recipient = usbControlRecipient;
Value
UsbControlRecipient UsbControlRecipient UsbControlRecipient UsbControlRecipient

The recipient of the USB control transfer.

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.