UsbDeviceClass UsbDeviceClass UsbDeviceClass Class

Definition

Provides a way for the app to get an Advanced Query Syntax (AQS) string by specifying the class code, subclass code, and the protocol code defined by the device. The properties in this class are passed in the call to GetDeviceClassSelector.

public sealed class UsbDeviceClass : IUsbDeviceClasspublic sealed class UsbDeviceClass : IUsbDeviceClassPublic NotInheritable Class UsbDeviceClass Implements IUsbDeviceClass
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

You can create a UsbDeviceClass object by specifying any one of the following sets of properties:

  • Class code.
  • Class and subclass codes.
  • Class, subclass, and protocol codes.

This code example shows how to specify the device class and subclass codes to obtain a UsbDevice object.

    byte deviceClass = 0xf0;
    byte deviceSubclass = 0x01;

    var myDevices = await 
                          Windows.Devices.Enumeration.DeviceInformation.FindAllAsync(
                          UsbDevice.GetDeviceClassSelector(
                          new UsbDeviceClass() {
                          Class = deviceClass, Subclass = deviceSubclass }));

Constructors

UsbDeviceClass() UsbDeviceClass() UsbDeviceClass()

Creates a UsbDeviceClass object.

public UsbDeviceClass()public UsbDeviceClass()Public Sub New()
Attributes

Properties

ClassCode ClassCode ClassCode

Gets or sets the class code of the device.

public byte ClassCode { get; set; }public byte ClassCode { get; set; }Public ReadWrite Property ClassCode As byte
Value
byte byte byte

The device class code.

Attributes

ProtocolCode ProtocolCode ProtocolCode

Gets or sets the protocol code of the device.

public IReference<byte> ProtocolCode { get; set; }public IReference<byte> ProtocolCode { get; set; }Public ReadWrite Property ProtocolCode As IReference<byte>
Value

The protocol code of the device.

Attributes

Remarks

You can set the ProtocolCode value only when SubclassCode value is set to a non-null value.

SubclassCode SubclassCode SubclassCode

Gets or sets the subclass code of the device.

public IReference<byte> SubclassCode { get; set; }public IReference<byte> SubclassCode { get; set; }Public ReadWrite Property SubclassCode As IReference<byte>
Value

The subclass code of the device.

Attributes