Partager via


CustomDevice.FromIdAsync(String, DeviceAccessMode, DeviceSharingMode) Méthode

Définition

Crée un objet CustomDevice de manière asynchrone pour le DeviceInformation.Id spécifié.

public:
 static IAsyncOperation<CustomDevice ^> ^ FromIdAsync(Platform::String ^ deviceId, DeviceAccessMode desiredAccess, DeviceSharingMode sharingMode);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<CustomDevice> FromIdAsync(winrt::hstring const& deviceId, DeviceAccessMode const& desiredAccess, DeviceSharingMode const& sharingMode);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<CustomDevice> FromIdAsync(string deviceId, DeviceAccessMode desiredAccess, DeviceSharingMode sharingMode);
function fromIdAsync(deviceId, desiredAccess, sharingMode)
Public Shared Function FromIdAsync (deviceId As String, desiredAccess As DeviceAccessMode, sharingMode As DeviceSharingMode) As IAsyncOperation(Of CustomDevice)

Paramètres

deviceId
String

Platform::String

winrt::hstring

DeviceInformation.Id de l’appareil .

desiredAccess
DeviceAccessMode

Accès souhaité.

sharingMode
DeviceSharingMode

Mode de partage.

Retours

Retourne un appareil personnalisé.

Attributs

Configuration requise pour Windows

Fonctionnalités de l’application
optical iot:lowLevelDevices

S’applique à