UsbDeviceClass UsbDeviceClass UsbDeviceClass UsbDeviceClass UsbDeviceClass Class


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
struct winrt::Windows::Devices::Usb::UsbDeviceClass
public sealed class UsbDeviceClass
Public NotInheritable Class UsbDeviceClass
var usbDeviceClass = new usbDeviceClass();

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


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 
                          new UsbDeviceClass() {
                          Class = deviceClass, Subclass = deviceSubclass }));


UsbDeviceClass() UsbDeviceClass() UsbDeviceClass() UsbDeviceClass() UsbDeviceClass()

Creates a UsbDeviceClass object.


ClassCode ClassCode ClassCode ClassCode ClassCode

Gets or sets the class code of the device.

ProtocolCode ProtocolCode ProtocolCode ProtocolCode ProtocolCode

Gets or sets the protocol code of the device.

SubclassCode SubclassCode SubclassCode SubclassCode SubclassCode

Gets or sets the subclass code of the device.