UsbDeviceClass Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 ref class UsbDeviceClass sealed
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class UsbDeviceClass final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class UsbDeviceClass final
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class UsbDeviceClass
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class UsbDeviceClass
function UsbDeviceClass()
Public NotInheritable Class UsbDeviceClass
- Inheritance
- Attributes
Device family |
Windows 10 (introduced in 10.0.10240.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
This C# 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(
Windows.Devices.Usb.UsbDevice.GetDeviceClassSelector(
new Windows.Devices.Usb.UsbDeviceClass()
{
ClassCode = deviceClass,
SubclassCode = deviceSubclass
}));
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.
Usb |
Creates a UsbDeviceClass object. |
Class |
Gets or sets the class code of the device. |
Protocol |
Gets or sets the protocol code of the device. |
Subclass |
Gets or sets the subclass code of the device. |
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |