CustomDevice.FromIdAsync(String, DeviceAccessMode, DeviceSharingMode) Method

Definition

Creates a CustomDevice object asynchronously for the specified DeviceInformation.Id.

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)

Parameters

deviceId
String

Platform::String

winrt::hstring

The DeviceInformation.Id of the device .

desiredAccess
DeviceAccessMode

The desired access.

sharingMode
DeviceSharingMode

The sharing mode.

Returns

Returns a custom device.

Attributes

Windows requirements

App capabilities
optical iot:lowLevelDevices

Applies to