ConnectionProfile 클래스
콘텐츠의 테이블 축소
콘텐츠의 테이블 확장

ConnectionProfile Class

현재 연결된 네트워크 또는 이전 네트워크 연결을 포함하는 네트워크 연결을 나타냅니다. 연결 상태 및 연결 통계에 대한 정보를 제공합니다.


var connectionProfile = getInternetConnectionProfile();




ConnectionProfile클래스에는 다음과 같은 형식의 멤버가 있습니다.


The ConnectionProfile 클래스 - 이러한 메서드가 있습니다. C#, Visual Basic 및 C++에서는 다음 위치의 메서드도 상속합니다. Object 클래스.

GetConnectionCost Gets the cost information for the connection.
GetConnectivityIntervalsAsync Gets a list of ConnectivityInterval objects, which indicate the timestamp for when the network connection began, and a time-span for the duration of that connection.
GetDataPlanStatus Gets the current status of the data plan associated with the connection.
GetDomainConnectivityLevel Gets the current domain authentication status for a network connection. Possible values are defined by DomainConnectivityLevel.
GetLocalUsage(DateTime, DateTime) Gets the estimated data usage for a connection during over a specific period of time.
GetLocalUsage(DateTime, DateTime, RoamingStates) Gets the estimated data usage for a connection over a specific period of time and roaming state.
GetNetworkConnectivityLevel Gets the network connectivity level for this connection. This value indicates what network resources, if any, are currently available.
GetNetworkNames Retrieves names associated with the network with which the connection is currently established.
GetNetworkUsageAsync Gets a list of the estimated data traffic and connection duration over a specified period of time, for a specific network usage state.
GetSignalBars Gets a value that indicates the current number of signal bars displayed by the Windows UI for the connection.



ConnectionProfile클래스 - 이러한 속성이 있습니다.

속성사용 권한Description


읽기 전용Gets a value that indicates if connection profile is a WLAN (WiFi) connection. This determines whether or not WlanConnectionProfileDetails is null.


읽기 전용Gets a value that indicates if connection profile is a WWAN (mobile) connection. This determines whether or not WwanConnectionProfileDetails is null.


읽기 전용Gets the object representing the network adapter providing connectivity for the connection.


읽기 전용Retrieves the security settings for the network.


읽기 전용Gets the name of the connection profile.


읽기 전용Gets the ID of the network operator who provisioned the connection profile.


읽기 전용Contains properties and methods defined by WlanConnectionProfile that are specific to WLAN (WiFi) connections.


읽기 전용Contains the properties and methods defined by WwanConnectionProfile that are specific to mobile broadband connections.



다음 예제 함수는 ConnectionProfile에서 데이터를 검색하는 방법을 보여 줍니다.

function getConnectionProfileInfo(connectionProfile) {
     returnString += "Connection Cost Information:\n\r";
     returnString += "===============\n\r";
     var connectionCost = connectionProfile.getConnectionCost();
     returnString += "Cost Type: " + getCostType(connectionCost.networkCostType) + "\n\r";
     returnString += "Roaming: " + connectionCost.roaming + "\n\r";
     returnString += "Over Datalimit: " + connectionCost.overDataLimit + "\n\r";
     returnString += "Approaching Datalimit: " + connectionCost.approachingDataLimit + "\n\r";

이러한 클래스 메서드를 구현하여 연결 정보에 액세스하는 방법에 대한 추가 예제는 빠른 시작: 네트워크 연결 정보 검색을 참조하십시오.

요구 사항

지원되는 최소 클라이언트

Windows 8 [Windows 스토어 앱, 데스크톱 앱]

지원되는 최소 서버

지원되는 사항 없음 [Windows 스토어 앱, 데스크톱 앱]

지원되는 최소 전화

Windows Phone 8


Windows::Networking::Connectivity [C++]





© 2017 Microsoft