CustomDevice.FromIdAsync(String, DeviceAccessMode, DeviceSharingMode) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for