Condividi tramite


DeviceInformation.FindAllAsync Method

Definition

Overloads

FindAllAsync(String, IIterable<String>, DeviceInformationKind, IDeviceEnumerationSettings)

Asynchronously enumerates DeviceInformation objects matching the specified Advanced Query Syntax (AQS) device interface selector string, the device kind, including the specified collection of properties, and with the settings.

FindAllAsync(String, IIterable<String>, DeviceInformationKind)

Enumerates DeviceInformation objects matching the specified Advanced Query Syntax (AQS) device interface selector string, the device kind, and including the specified collection of properties.

FindAllAsync(String, IIterable<String>)

Enumerates DeviceInformation objects matching the specified Advanced Query Syntax (AQS) device interface selector string and including the specified collection of properties.

FindAllAsync(DeviceClass)

Enumerates DeviceInformation objects of the specified class.

FindAllAsync(String)

Enumerates DeviceInformation objects matching the specified Advanced Query Syntax (AQS) device interface selector string.

FindAllAsync()

Enumerates all DeviceInformation objects.

FindAllAsync(String, IIterable<String>, DeviceInformationKind, IDeviceEnumerationSettings)

Asynchronously enumerates DeviceInformation objects matching the specified Advanced Query Syntax (AQS) device interface selector string, the device kind, including the specified collection of properties, and with the settings.

public:
 static IAsyncOperation<DeviceInformationCollection ^> ^ FindAllAsync(Platform::String ^ aqsFilter, IIterable<Platform::String ^> ^ additionalProperties, DeviceInformationKind kind, IDeviceEnumerationSettings ^ settings);
/// [Windows.Foundation.Metadata.Overload("FindAllAsyncWithAqsFilterAdditionalPropertiesKindAndSettings")]
 static IAsyncOperation<DeviceInformationCollection> FindAllAsync(winrt::hstring const& aqsFilter, IIterable<winrt::hstring> const& additionalProperties, DeviceInformationKind const& kind, IDeviceEnumerationSettings const& settings);
[Windows.Foundation.Metadata.Overload("FindAllAsyncWithAqsFilterAdditionalPropertiesKindAndSettings")]
public static IAsyncOperation<DeviceInformationCollection> FindAllAsync(string aqsFilter, IEnumerable<string> additionalProperties, DeviceInformationKind kind, IDeviceEnumerationSettings settings);
function findAllAsync(aqsFilter, additionalProperties, kind, settings)
Public Shared Function FindAllAsync (aqsFilter As String, additionalProperties As IEnumerable(Of String), kind As DeviceInformationKind, settings As IDeviceEnumerationSettings) As IAsyncOperation(Of DeviceInformationCollection)

Parameters

aqsFilter
String

Platform::String

winrt::hstring

An AQS device interface selector string that filters the DeviceInformation objects to enumerate. Typically this string is retrieved from the GetDeviceSelector method of a class that interacts with devices. For example, GetDeviceSelector retrieves the string for the StorageDevice class.

additionalProperties

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

An iterable list of additional properties to include in the Properties property of the DeviceInformation objects in the enumeration results. For more info on what the properties represent, see Device information properties.

kind
DeviceInformationKind

The specific type of device to find.

settings
IDeviceEnumerationSettings

Enumeration settings come from a device API's GetDeviceEnumerationSettings method, and contain opaque data. An object implementing this must also implement the IDeviceEnumerationSettings interface.

Returns

An asynchronous operation object which, when it completes, contains the DeviceInformation objects.

Attributes

Windows requirements

Device family
Windows 11, version 24H2 (introduced in 10.0.26100.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v19.0)

Applies to

FindAllAsync(String, IIterable<String>, DeviceInformationKind)

Enumerates DeviceInformation objects matching the specified Advanced Query Syntax (AQS) device interface selector string, the device kind, and including the specified collection of properties.

public:
 static IAsyncOperation<DeviceInformationCollection ^> ^ FindAllAsync(Platform::String ^ aqsFilter, IIterable<Platform::String ^> ^ additionalProperties, DeviceInformationKind kind);
/// [Windows.Foundation.Metadata.Overload("FindAllAsyncWithKindAqsFilterAndAdditionalProperties")]
 static IAsyncOperation<DeviceInformationCollection> FindAllAsync(winrt::hstring const& aqsFilter, IIterable<winrt::hstring> const& additionalProperties, DeviceInformationKind const& kind);
[Windows.Foundation.Metadata.Overload("FindAllAsyncWithKindAqsFilterAndAdditionalProperties")]
public static IAsyncOperation<DeviceInformationCollection> FindAllAsync(string aqsFilter, IEnumerable<string> additionalProperties, DeviceInformationKind kind);
function findAllAsync(aqsFilter, additionalProperties, kind)
Public Shared Function FindAllAsync (aqsFilter As String, additionalProperties As IEnumerable(Of String), kind As DeviceInformationKind) As IAsyncOperation(Of DeviceInformationCollection)

Parameters

aqsFilter
String

Platform::String

winrt::hstring

An AQS device interface selector string that filters the DeviceInformation objects to enumerate. Typically this string is retrieved from the GetDeviceSelector method of a class that interacts with devices. For example, GetDeviceSelector retrieves the string for the StorageDevice class.

additionalProperties

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

An iterable list of additional properties to include in the Properties property of the DeviceInformation objects in the enumeration results. For more info on what the properties represent, see Device information properties.

kind
DeviceInformationKind

The specific type of device to find.

Returns

The object for managing the asynchronous operation.

Attributes

See also

Applies to

FindAllAsync(String, IIterable<String>)

Enumerates DeviceInformation objects matching the specified Advanced Query Syntax (AQS) device interface selector string and including the specified collection of properties.

public:
 static IAsyncOperation<DeviceInformationCollection ^> ^ FindAllAsync(Platform::String ^ aqsFilter, IIterable<Platform::String ^> ^ additionalProperties);
/// [Windows.Foundation.Metadata.Overload("FindAllAsyncAqsFilterAndAdditionalProperties")]
 static IAsyncOperation<DeviceInformationCollection> FindAllAsync(winrt::hstring const& aqsFilter, IIterable<winrt::hstring> const& additionalProperties);
[Windows.Foundation.Metadata.Overload("FindAllAsyncAqsFilterAndAdditionalProperties")]
public static IAsyncOperation<DeviceInformationCollection> FindAllAsync(string aqsFilter, IEnumerable<string> additionalProperties);
function findAllAsync(aqsFilter, additionalProperties)
Public Shared Function FindAllAsync (aqsFilter As String, additionalProperties As IEnumerable(Of String)) As IAsyncOperation(Of DeviceInformationCollection)

Parameters

aqsFilter
String

Platform::String

winrt::hstring

An AQS device interface selector string that filters the DeviceInformation objects to enumerate. Typically this string is retrieved from the GetDeviceSelector method of a class that interacts with devices. For example, GetDeviceSelector retrieves the string for the StorageDevice class.

additionalProperties

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

An iterable list of additional properties to include in the Properties property of the DeviceInformation objects in the enumeration results. For more info on what the properties represent, see Device information properties.

Returns

The object for managing the asynchronous operation.

Attributes

See also

Applies to

FindAllAsync(DeviceClass)

Enumerates DeviceInformation objects of the specified class.

public:
 static IAsyncOperation<DeviceInformationCollection ^> ^ FindAllAsync(DeviceClass deviceClass);
/// [Windows.Foundation.Metadata.DefaultOverload]
/// [Windows.Foundation.Metadata.Overload("FindAllAsyncDeviceClass")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<DeviceInformationCollection> FindAllAsync(DeviceClass const& deviceClass);
[Windows.Foundation.Metadata.DefaultOverload]
[Windows.Foundation.Metadata.Overload("FindAllAsyncDeviceClass")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<DeviceInformationCollection> FindAllAsync(DeviceClass deviceClass);
function findAllAsync(deviceClass)
Public Shared Function FindAllAsync (deviceClass As DeviceClass) As IAsyncOperation(Of DeviceInformationCollection)

Parameters

deviceClass
DeviceClass

The class of devices to enumerate.

Returns

The object for managing the asynchronous operation.

Attributes

See also

Applies to

FindAllAsync(String)

Enumerates DeviceInformation objects matching the specified Advanced Query Syntax (AQS) device interface selector string.

public:
 static IAsyncOperation<DeviceInformationCollection ^> ^ FindAllAsync(Platform::String ^ aqsFilter);
/// [Windows.Foundation.Metadata.Overload("FindAllAsyncAqsFilter")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<DeviceInformationCollection> FindAllAsync(winrt::hstring const& aqsFilter);
[Windows.Foundation.Metadata.Overload("FindAllAsyncAqsFilter")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<DeviceInformationCollection> FindAllAsync(string aqsFilter);
function findAllAsync(aqsFilter)
Public Shared Function FindAllAsync (aqsFilter As String) As IAsyncOperation(Of DeviceInformationCollection)

Parameters

aqsFilter
String

Platform::String

winrt::hstring

An AQS device interface selector string that filters the DeviceInformation objects to enumerate. Typically this string is retrieved from the GetDeviceSelector method of a class that interacts with devices. For example, GetDeviceSelector retrieves the string for the StorageDevice class.

Returns

The object for managing the asynchronous operation.

Attributes

Remarks

Important

This method is not available using JavaScript. If you try to use it, your code will instead call FindAllAsync(DeviceClass) with an invalid class and return a collection with all devices. Instead, you should use FindAllAsync(String, IIterable(String) with null as the second parameter if no other properties are needed.

See also

Applies to

FindAllAsync()

Enumerates all DeviceInformation objects.

public:
 static IAsyncOperation<DeviceInformationCollection ^> ^ FindAllAsync();
/// [Windows.Foundation.Metadata.Overload("FindAllAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<DeviceInformationCollection> FindAllAsync();
[Windows.Foundation.Metadata.Overload("FindAllAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<DeviceInformationCollection> FindAllAsync();
function findAllAsync()
Public Shared Function FindAllAsync () As IAsyncOperation(Of DeviceInformationCollection)

Returns

The object for managing the asynchronous operation.

Attributes

See also

Applies to