INetwork interface (netlistmgr.h)
The INetwork interface represents a network on the local machine. It can also represent a collection of network connections with a similar network signature.
Inheritance
The INetwork interface inherits from the IUnknown interface. INetwork also has these types of members:
Methods
The INetwork interface has these methods.
INetwork::get_IsConnected The get_IsConnected property specifies if the network has any network connectivity. |
INetwork::get_IsConnectedToInternet The get_IsConnectedToInternet property specifies if the network has internet connectivity. |
INetwork::GetCategory The GetCategory method returns the category of a network. |
INetwork::GetConnectivity The GetConnectivity method returns the connectivity state of the network. |
INetwork::GetDescription The GetDescription method returns a description string for the network. |
INetwork::GetDomainType The GetDomainType method returns the domain type of a network. |
INetwork::GetName The GetName method returns the name of a network. |
INetwork::GetNetworkConnections The GetNetworkConnections method returns an enumeration of all network connections for a network. A network can have multiple connections to it from different interfaces or different links from the same interface. |
INetwork::GetNetworkId The GetNetworkId method returns the unique identifier of a network. |
INetwork::GetTimeCreatedAndConnected The GetTimeCreatedAndConnected method returns the local date and time when the network was created and connected. |
INetwork::SetCategory The SetCategory method sets the category of a network. Changes made take effect immediately. Callers of this API must be members of the Administrators group. |
INetwork::SetDescription The SetDescription method sets or replaces the description for a network. |
INetwork::SetName The SetName method sets or renames a network. |
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:
Parameter | Type | Description |
---|---|---|
NA_DomainAuthenticationFailed | VT_BOOL | Specifies 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:
|
NA_InternetConnectivityV4
or NA_InternetConnectivityV6 |
NLM_INTERNET_CONNECTIVITY value stored as VT_UINT |
Provides details regarding IPv4 or IPv6 network connectivity. Possible values include:
|
NA_NameSetByPolicy | VT_BOOL | The name of the network has been set by group policy. |
NA_IconSetByPolicy | VT_BOOL | The icon of the network has been set by group policy. |
NA_DescriptionSetByPolicy | VT_BOOL | The description of the network has been set by group policy. |
NA_CategorySetByPolicy | VT_BOOL | The category of the network has been set by group policy. |
NA_NameReadOnly | VT_BOOL | The name of the network is read only. |
NA_IconReadOnly | VT_BOOL | The icon of the network is read only. |
NA_DescriptionReadOnly | VT_BOOL | The description of the network is read only. |
NA_CategoryReadOnly | VT_BOOL | The category of the network is read only. |
NA_AllowMerge | VT_BOOL | The 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
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | netlistmgr.h |