Share via


Battery.GetDeviceSelector 方法

定义

获取高级查询语法 (AQS) 字符串,该字符串可用于查找连接到设备的所有电池控制器。

public:
 static Platform::String ^ GetDeviceSelector();
 static winrt::hstring GetDeviceSelector();
public static string GetDeviceSelector();
function getDeviceSelector()
Public Shared Function GetDeviceSelector () As String

返回

String

Platform::String

winrt::hstring

可用于查找连接到设备的所有电池控制器的 AQS 字符串。

注解

将 GetDeviceSelector 返回的 AQS 字符串与 DeviceInformation API 配合使用,查找连接到设备的所有电池控制器。 有关如何创建 Battery 对象的信息,请参阅 FromIdAsync

适用于

另请参阅