Share via


UsbDevice.GetDeviceSelector Method

Definition

Overloads

GetDeviceSelector(Guid)

Gets an Advanced Query Syntax (AQS) string, based on the device interface GUID identifier, specified by the app. The app passes the string to DeviceInformation.FindAllAsync in order to find a specific type of USB device.

GetDeviceSelector(UInt32, UInt32)

Gets an Advanced Query Syntax (AQS) string, based on vendor and product identifiers, specified by the app. The app passes the string to DeviceInformation.FindAllAsync in order to find a specific type of USB device.

GetDeviceSelector(UInt32, UInt32, Guid)

Gets an Advanced Query Syntax (AQS) string, based on vendor, product, and device interface GUID identifiers, specified by the app. The app passes the string to DeviceInformation.FindAllAsync in order to find a specific type of USB device.

GetDeviceSelector(Guid)

Gets an Advanced Query Syntax (AQS) string, based on the device interface GUID identifier, specified by the app. The app passes the string to DeviceInformation.FindAllAsync in order to find a specific type of USB device.

public:
 static Platform::String ^ GetDeviceSelector(Platform::Guid winUsbInterfaceClass);
/// [Windows.Foundation.Metadata.Overload("GetDeviceSelectorGuidOnly")]
 static winrt::hstring GetDeviceSelector(winrt::guid const& winUsbInterfaceClass);
[Windows.Foundation.Metadata.Overload("GetDeviceSelectorGuidOnly")]
public static string GetDeviceSelector(Guid winUsbInterfaceClass);
function getDeviceSelector(winUsbInterfaceClass)
Public Shared Function GetDeviceSelector (winUsbInterfaceClass As Guid) As String

Parameters

winUsbInterfaceClass
Guid

Platform::Guid

winrt::guid

The device interface GUID exposed by the Winusb.sys driver. See the remarks section.

Returns

String

Platform::String

winrt::hstring

String formatted as an AQS query.

Attributes

Remarks

You can obtain the device interface GUID from the DeviceInterfaceGuids registry entry under this key:HKEY_LOCAL_MACHINE*System**CurrentControlSet**Enum**USB**<Device Identifier>*<Instance Identifier>*Device Parameters*

See also

Applies to

GetDeviceSelector(UInt32, UInt32)

Gets an Advanced Query Syntax (AQS) string, based on vendor and product identifiers, specified by the app. The app passes the string to DeviceInformation.FindAllAsync in order to find a specific type of USB device.

public:
 static Platform::String ^ GetDeviceSelector(unsigned int vendorId, unsigned int productId);
/// [Windows.Foundation.Metadata.Overload("GetDeviceSelectorVidPidOnly")]
 static winrt::hstring GetDeviceSelector(uint32_t const& vendorId, uint32_t const& productId);
[Windows.Foundation.Metadata.Overload("GetDeviceSelectorVidPidOnly")]
public static string GetDeviceSelector(uint vendorId, uint productId);
function getDeviceSelector(vendorId, productId)
Public Shared Function GetDeviceSelector (vendorId As UInteger, productId As UInteger) As String

Parameters

vendorId
UInt32

unsigned int

uint32_t

Specifies the vendor identifier for the device as assigned by the USB specification committee. Possible values are 0 through 0xffff.

productId
UInt32

unsigned int

uint32_t

Specifies the product identifier. This value is assigned by the manufacturer and is device-specific. Possible values are 0 through 0xffff.

Returns

String

Platform::String

winrt::hstring

String formatted as an AQS query.

Attributes

See also

Applies to

GetDeviceSelector(UInt32, UInt32, Guid)

Gets an Advanced Query Syntax (AQS) string, based on vendor, product, and device interface GUID identifiers, specified by the app. The app passes the string to DeviceInformation.FindAllAsync in order to find a specific type of USB device.

public:
 static Platform::String ^ GetDeviceSelector(unsigned int vendorId, unsigned int productId, Platform::Guid winUsbInterfaceClass);
/// [Windows.Foundation.Metadata.Overload("GetDeviceSelector")]
 static winrt::hstring GetDeviceSelector(uint32_t const& vendorId, uint32_t const& productId, winrt::guid const& winUsbInterfaceClass);
[Windows.Foundation.Metadata.Overload("GetDeviceSelector")]
public static string GetDeviceSelector(uint vendorId, uint productId, Guid winUsbInterfaceClass);
function getDeviceSelector(vendorId, productId, winUsbInterfaceClass)
Public Shared Function GetDeviceSelector (vendorId As UInteger, productId As UInteger, winUsbInterfaceClass As Guid) As String

Parameters

vendorId
UInt32

unsigned int

uint32_t

Specifies the vendor identifier for the device as assigned by the USB specification committee. Possible values are 0 through 0xffff.

productId
UInt32

unsigned int

uint32_t

Specifies the product identifier. This value is assigned by the manufacturer and is device-specific. Possible values are 0 through 0xffff.

winUsbInterfaceClass
Guid

Platform::Guid

winrt::guid

The device interface GUID exposed by the Winusb.sys driver. See the remarks section.

Returns

String

Platform::String

winrt::hstring

String formatted as an AQS query.

Attributes

Remarks

You can obtain the device interface GUID from the DeviceInterfaceGuids registry entry under this key:HKEY_LOCAL_MACHINE*System**CurrentControlSet**Enum**USB**<Device Identifier>*<Instance Identifier>*Device Parameters*

See also

Applies to