Share via


UsbDevice.GetDeviceSelector 方法

定义

重载

GetDeviceSelector(Guid)

根据应用指定的设备接口 GUID 标识符,获取 AQS) 字符串 (高级查询语法。 应用将字符串传递给 DeviceInformation.FindAllAsync ,以便查找特定类型的 USB 设备。

GetDeviceSelector(UInt32, UInt32)

根据应用指定的供应商和产品标识符,获取 (AQS) 字符串的高级查询语法。 应用将字符串传递给 DeviceInformation.FindAllAsync ,以便查找特定类型的 USB 设备。

GetDeviceSelector(UInt32, UInt32, Guid)

根据应用指定的供应商、产品和设备接口 GUID 标识符,获取 (AQS) 字符串的高级查询语法。 应用将字符串传递给 DeviceInformation.FindAllAsync ,以便查找特定类型的 USB 设备。

GetDeviceSelector(Guid)

根据应用指定的设备接口 GUID 标识符,获取 AQS) 字符串 (高级查询语法。 应用将字符串传递给 DeviceInformation.FindAllAsync ,以便查找特定类型的 USB 设备。

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

参数

winUsbInterfaceClass
Guid

Platform::Guid

winrt::guid

Winusb.sys 驱动程序公开的设备接口 GUID。 请参阅备注部分。

返回

String

Platform::String

winrt::hstring

格式化为 AQS 查询的字符串。

属性

注解

可以从以下项下的 DeviceInterfaceGuids 注册表项获取设备接口 GUID:HKEY_LOCAL_MACHINE*System**CurrentControlSet**枚举**USB**<设备标识符>*<实例标识符>*设备参数*

另请参阅

适用于

GetDeviceSelector(UInt32, UInt32)

根据应用指定的供应商和产品标识符,获取 (AQS) 字符串的高级查询语法。 应用将字符串传递给 DeviceInformation.FindAllAsync ,以便查找特定类型的 USB 设备。

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

参数

vendorId
UInt32

unsigned int

uint32_t

指定 USB 规范委员会分配的设备供应商标识符。 可能的值为 0 到 0xffff。

productId
UInt32

unsigned int

uint32_t

指定产品标识符。 此值由制造商分配,特定于设备。 可能的值为 0 到 0xffff。

返回

String

Platform::String

winrt::hstring

格式化为 AQS 查询的字符串。

属性

另请参阅

适用于

GetDeviceSelector(UInt32, UInt32, Guid)

根据应用指定的供应商、产品和设备接口 GUID 标识符,获取 (AQS) 字符串的高级查询语法。 应用将字符串传递给 DeviceInformation.FindAllAsync ,以便查找特定类型的 USB 设备。

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

参数

vendorId
UInt32

unsigned int

uint32_t

指定 USB 规范委员会分配的设备供应商标识符。 可能的值为 0 到 0xffff。

productId
UInt32

unsigned int

uint32_t

指定产品标识符。 此值由制造商分配,特定于设备。 可能的值为 0 到 0xffff。

winUsbInterfaceClass
Guid

Platform::Guid

winrt::guid

Winusb.sys 驱动程序公开的设备接口 GUID。 请参阅备注部分。

返回

String

Platform::String

winrt::hstring

格式化为 AQS 查询的字符串。

属性

注解

可以从以下项下的 DeviceInterfaceGuids 注册表项获取设备接口 GUID:HKEY_LOCAL_MACHINE*System**CurrentControlSet**枚举**USB**<设备标识符>*<实例标识符>*设备参数*

另请参阅

适用于