MiracastReceiver.DisconnectAllAndApplySettings 方法

定义

断开所有当前连接的 Miracast 连接,并在 MiracastReceiver 上应用指定的设置。

public:
 virtual MiracastReceiverApplySettingsResult ^ DisconnectAllAndApplySettings(MiracastReceiverSettings ^ settings) = DisconnectAllAndApplySettings;
MiracastReceiverApplySettingsResult DisconnectAllAndApplySettings(MiracastReceiverSettings const& settings);
public MiracastReceiverApplySettingsResult DisconnectAllAndApplySettings(MiracastReceiverSettings settings);
function disconnectAllAndApplySettings(settings)
Public Function DisconnectAllAndApplySettings (settings As MiracastReceiverSettings) As MiracastReceiverApplySettingsResult

参数

settings
MiracastReceiverSettings

将应用的设置。

返回

包含有关操作结果的信息的 MiracastReceiverApplySettingsResult

注解

由于此方法可能会阻塞一段时间,因此不应从 UI 线程或单线程单元调用它。 请改用异步方法 DisconnectAllAndApplySettingsAsync

检查 MiracastReceiverApplySettingsResult 返回参数以确认已成功应用设置。 如果操作系统启用了 Miracast(例如通过“设置”应用),则不允许更改设置, MiracastReceiverApplySettingsResult 返回值将指示访问被拒绝。

适用于

另请参阅