Export (0) Print
Expand All

INetwork interface

The INetwork interface represents a network on the local machine. It can also represent a collection of network connections with a similar network signature.

Members

The INetwork interface inherits from the IUnknown interface. INetwork also has these types of members:

Methods

The INetwork interface has these methods.

MethodDescription
GetCategory

Returns the category of a network.

GetConnectivity

Returns the connectivity state of the network.

GetDescription

Returns a description string for the network.

GetDomainType

Returns the type of network.

GetName

Returns the name of the network.

GetNetworkConnections

Returns an enumeration of all network connections for a network.

GetNetworkId

Returns the unique identifier of a network.

GetTimeCreatedAndConnected

Returns the local date and time when the network was created and connected.

SetCategory

Sets the category of a network. Administrative privileges are needed for this API call.

SetDescription

Sets a new description for the network.

SetName

Sets or renames the network. This change occurs immediately.

 

Properties

The INetwork interface has these properties.

PropertyAccess typeDescription

get_IsConnected

Read-only

Specifies if the network has any network connectivity.

get_IsConnectedToInternet

Read-only

Specifies if the network has internet connectivity.

 

Remarks

The COM Object that implements INetwork also implements a property bag for additional properties. To get access to this property bag you can use the INetwork interface and QueryInterface for IPropertyBag. The property bag on this COM Object contains the following properties:

ParameterTypeDescription
NA_DomainAuthenticationFailedVT_BOOLSpecifies that a domain network is not able to authenticate against the domain controller.
NA_NetworkClass NLM_NETWORK_CLASS value stored as VT_UINT Specifies the class of network. Possible values include:
  • NLM_NETWORK_IDENTIFYING (0x01)

    This is the special "Identifying" network. No properties on this network class can be changed.

  • NLM_NETWORK_IDENTIFIED (0x02)

    This is an Identified network.

  • NLM_NETWORK_UNIDENTIFIED (0x03)

    This is the special "Unidentified" network. The category of this network can be changed, but it will not persist when the network is disconnected.

NA_InternetConnectivityV4

or

NA_InternetConnectivityV6

NLM_INTERNET_CONNECTIVITY value stored as VT_UINT

Provides details regarding IPv4 or IPv6 network connectivity. Possible values include:

  • NLM_INTERNET_CONNECTIVITY_WEBHIJACK (0x1)

    The detected network is a hotspot. For example, when connected to a coffee Wi-Fi hotspot network and the local HTTP traffic is being redirected to a captive portal, this flag will be set.

  • NLM_INTERNET_CONNECTIVITY_PROXIED (0x2)

    The detected network has a proxy configuration. For example, when connected to a corporate network using a proxy for HTTP access, this flag will be set.

  • NLM_INTERNET_CONNECTIVITY_CORPORATE (0x4)

    The machine has been configured for Direct Access and access is detected to the corporate domain network Direct Access has been configured for.

NA_NameSetByPolicyVT_BOOLThe name of the network has been set by group policy.
NA_IconSetByPolicyVT_BOOLThe icon of the network has been set by group policy.
NA_DescriptionSetByPolicyVT_BOOLThe description of the network has been set by group policy.
NA_CategorySetByPolicyVT_BOOLThe category of the network has been set by group policy.
NA_NameReadOnlyVT_BOOLThe name of the network is read only.
NA_IconReadOnlyVT_BOOLThe icon of the network is read only.
NA_DescriptionReadOnlyVT_BOOLThe description of the network is read only.
NA_CategoryReadOnlyVT_BOOLThe category of the network is read only.
NA_AllowMergeVT_BOOLThe network can be merged with another network.

 

The IPropertyBag interface accepts LPCOLESTR as part of the IPropertyBag::Read and IPropertyBag::Write methods. For convenience, the string values for these properties are defined inside netlistmgr.h using the same names.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Netlistmgr.h

IDL

Netlistmgr.idl

 

 

Community Additions

ADD
Show:
© 2014 Microsoft