Dela via


DevicePairingRequestedEventArgs.AcceptWithAddress(String) Method

Definition

Accepts a PairingRequested event with an address, and pairs the device with the application.

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)

Parameters

address
String

Platform::String

winrt::hstring

Your app must provide an address from the device. This is typically used for directed discovery over a network protocol such as IPP or UPnP, where the application already knows the IP/address/URL of the device. You should call AcceptWithAddress if you want the pairing to complete. Pass in the address as a parameter.

Windows requirements

Device family
Windows 11, version 24H2 (introduced in 10.0.26100.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v19.0)

Applies to