CustomDevice.FromIdAsync(String, DeviceAccessMode, DeviceSharingMode) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
为指定的 DeviceInformation.Id 异步创建 CustomDevice 对象。
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)
参数
- deviceId
-
String
Platform::String
winrt::hstring
设备 的 DeviceInformation.Id 。
- desiredAccess
- DeviceAccessMode
所需访问权限。
- sharingMode
- DeviceSharingMode
共享模式。
返回
返回自定义设备。
- 属性
Windows 要求
应用功能 |
optical
iot:lowLevelDevices
|