Share via


WwanConnectionProfileDetails Class

Definition

Provides WWAN (cellular) specific details for a connection profile: carrier identifiers, registration state, current data class, IP kind, and purpose GUIDs.

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

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Networking.Connectivity.WwanContract (introduced in v1.0)

Examples

Display current WWAN technology and roaming (C#)

using Windows.Networking.Connectivity;

var profile = NetworkInformation.GetInternetConnectionProfile();
if (profile?.IsWwanConnectionProfile == true)
{
    var details = profile.WwanConnectionProfileDetails;
    var reg = details.GetNetworkRegistrationState();
    var dataClass = details.GetCurrentDataClass();
    var cost = profile.GetConnectionCost();

    bool isRoaming = reg == WwanNetworkRegistrationState.Roaming;
    string tech = dataClass.ToString(); // Map or bucket as needed

    System.Diagnostics.Debug.WriteLine(
        $"Carrier={details.HomeProviderId} APN={details.AccessPointName} Tech={tech} Roaming={isRoaming} Metered={cost.Roaming || cost.OverDataLimit}");
}

Check dual-stack capability (C#)

var p = NetworkInformation.GetInternetConnectionProfile();
if (p?.IsWwanConnectionProfile == true)
{
    var ipKind = p.WwanConnectionProfileDetails.IPKind;
    bool hasIpv6 = ipKind == WwanNetworkIPKind.Ipv6 ||
                   ipKind == WwanNetworkIPKind.Ipv4v6;
    // Adjust endpoint selection accordingly
}

Remarks

Retrieval

Access via ConnectionProfile.WwanConnectionProfileDetails when ConnectionProfile.IsWwanConnectionProfile is true.

Key properties

Area Property / Method Purpose
Carrier ID HomeProviderId MCC+MNC identifying the home carrier
APN AccessPointName APN used for this data session
Registration GetNetworkRegistrationState Current network registration state
Data technology GetCurrentDataClass Active cellular data class (flags)
IP protocol IPKind IPv4 / IPv6 / dual-stack configuration
Purpose tagging PurposeGuids Scenario / policy identifiers applied to the profile

Registration states

Returned by GetNetworkRegistrationState: | State | Meaning | | -- | -- | | Home | Registered on home network | | Roaming | Registered on a roaming network | | Partner | Registered on preferred partner network | | Searching | Scanning for service | | Denied | Registration rejected (entitlement / SIM / network) | | None | Not registered / no capability |

Data class (examples)

GetCurrentDataClass returns a bitmask; common groupings: | Generation | Flags (non exhaustive) | | -- | -- | | 5G | NewRadioNonStandalone, NewRadioStandalone | | 4G / LTE | LteAdvanced | | 3G | Umts, Hsdpa, Hsupa | | 2G | Gprs, Edge | | CDMA | (Various CDMA flags) |

Note

Reported value is the currently active technology, not necessarily the modem's peak capability.

Usage patterns

Scenario Relevant members Notes
Show carrier + technology badge HomeProviderId, GetCurrentDataClass Map bitmask to a UI string (for example, 5G or LTE)
Enforce roaming policy GetNetworkRegistrationState, ConnectionCost Combine roaming state + metering
APN diagnostics AccessPointName, PurposeGuids PurposeGuids distinguishes specialized carrier profiles
IPv6 readiness IPKind Decide whether to prefer IPv6 endpoints

Best practices

  • Re-query on network status change events; WWAN tech can shift (e.g., LTE -> 5G NSA).
  • Do not hard-code assumptions about future data classes; handle unknown flags gracefully.
  • Treat roaming + metered cost as a trigger to reduce background transfer volume.
  • For analytics, log normalized technology buckets (2G/3G/4G/5G) rather than raw flag sets.

Version additions

Windows version Added
1803 IPKind, PurposeGuids
1903+ 5G data class flags (NR NSA / SA)

Properties

AccessPointName

Indicates the name of the access point used to establish the WWAN connection.

HomeProviderId

Indicates the Home Network Provider ID.

IPKind

Gets a value that describes a level of supported IP.

PurposeGuids

Gets a list of purpose group GUIDs.

Methods

GetCurrentDataClass()

Indicates the class of data service offered by the network currently in use for the WWAN connection.

GetNetworkRegistrationState()

Retrieves the current network registration state for the WWAN connection.

Applies to

See also