DevicePairingRequestedEventArgs.AcceptWithAddress(String) 方法

定義

接受具有位址的 PairingRequested 事件,並將裝置與應用程式配對。

public:
 virtual void AcceptWithAddress(Platform::String ^ address) = AcceptWithAddress;
void AcceptWithAddress(winrt::hstring const& address);
public void AcceptWithAddress(string address);
function acceptWithAddress(address)
Public Sub AcceptWithAddress (address As String)

參數

address
String

Platform::String

winrt::hstring

您的應用程式必須提供來自裝置的位址。 這通常用於透過 IPP 或 UPnP 等網路協議進行導向探索,其中應用程式已經知道裝置的 IP/位址/URL。 如果您想要配對完成,您應該呼叫 AcceptWithAddress 。 以參數的形式傳入位址。

Windows 需求

裝置系列
Windows 11 Insider Preview (已於 10.0.26100.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v19.0 引進)

適用於