Compartilhar via


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

Definição

Cria um objeto CustomDevice de forma assíncrona para o DeviceInformation.Id especificado.

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)

Parâmetros

deviceId
String

Platform::String

winrt::hstring

O DeviceInformation.Id do dispositivo .

desiredAccess
DeviceAccessMode

O acesso desejado.

sharingMode
DeviceSharingMode

O modo de compartilhamento.

Retornos

Retorna um dispositivo personalizado.

Atributos

Requisitos do Windows

Funcionalidades do aplicativo
optical iot:lowLevelDevices

Aplica-se a