Delen via


WiFiDirectLegacySettings Class

Definition

Settings governing "legacy" mode (non-Wi-Fi Direct connections to the access point being advertised.)

public ref class WiFiDirectLegacySettings sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class WiFiDirectLegacySettings final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class WiFiDirectLegacySettings
Public NotInheritable Class WiFiDirectLegacySettings
Inheritance
Object Platform::Object IInspectable WiFiDirectLegacySettings
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

The access point allows devices that do not support Wi-Fi Direct to connect to a device that does support it, and to use the services offered by the Wi-Fi Direct device. The connection does not serve as a general-purpose Wi-Fi access point.

Your code retrieves instances of this class through the WiFiDirectAdvertisement.LegacySettings property. It does not instantiate the class directly.

The SSID is initially set to a Wi-Fi Direct-compatible random string beginning with ""DIRECT-"". Your code can change this value to a different SSID if you choose to do so.

The pass phrase is initialized to a random alphanumeric string. Your code can change this value to a different pass phrase if you choose to do so.

Windows 10, version 1607 supports Mobile Hotspot, an enhanced version of the mobile broadband tethering feature. If an application uses the functionality of the WiFiDirectLegacySettings class to start the Wi-Fi Direct group owner role, and if the Mobile Hotspot is subsequently started, the functionality of this class is not supported. It is likely to stop working.

The Mobile Hotspot and Wi-Fi Direct technologies cannot run at the same time. Mobile Hotspot takes precedence over all Wi-Fi Direct scenarios.

Properties

IsEnabled

Gets or sets a value specifying whether "legacy mode" is enabled. When enabled, this mode causes this device to act as a normal Wi-Fi access point, and is intended to support devices which do not support connection via Wi-Fi Direct.

Passphrase

Gets or sets the pass phrase used by non-Wi-Fi Direct clients to connect to this access point in "legacy mode".

Ssid

Gets or sets the Service Set Identifier (SSID, or "access point ID").

Applies to