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
|