Click to Rate and Give Feedback
MSDN
MSDN Library
Networking
NLM Interfaces
INetwork
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.

Methods

The INetwork interface inherits the methods of the IUnknown interface.

In addition, INetwork defines the following methods.

MethodDescription

GetName

Returns the name of the network.

SetName

Sets or renames the network. This change occurs immediately.

GetDescription

Returns a description string for the network.

SetDescription

Sets a new description for the network.

GetNetworkId

Returns the unique identifier of a network.

GetDomainType

Returns the type of network.

GetNetworkConnections

Returns an enumeration of all network connections for a network.

GetTimeCreatedAndConnected

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

GetConnectivity

Returns the connectivity state of the network.

GetCategory

Returns the category of a network.

SetCategory

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

 

Properties

The INetwork interface defines the following 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_NetworkClassNP_NETWORK_CLASS stored as VT_UINT Specifies the class of network. This parameter will hold the default category value of NLM_NETWORK_CATEGORY_PUBLIC if a specific value is not set by the Group Policy. Possible values include:

  • NP_NETWORK_IDENTIFYING (0x01)

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

  • NP_NETWORK_IDENTIFIED (0x02)

    This is an Identified network.

  • NP_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_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 clientWindows Vista
Minimum supported serverWindows Server 2008
HeaderNetlistmgr.h
IDLNetlistmgr.idl

Send comments about this topic to Microsoft

Build date: 11/19/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker