INetSharingConfiguration interface (netcon.h)

[Internet Connection Firewall may be altered or unavailable in subsequent versions. Instead, use the Windows Firewall API.]

The INetSharingConfiguration interface provides methods to manage connection sharing, port mapping, and Internet Connection Firewall.


The INetSharingConfiguration interface inherits from the IDispatch interface. INetSharingConfiguration also has these types of members:


The INetSharingConfiguration interface has these methods.

Method Description
INetSharingConfiguration::AddPortMapping Adds a service port mapping for this connection.
INetSharingConfiguration::DisableInternetFirewall The DisableInternetFirewall method disables Internet Connection Firewall on this connection.
INetSharingConfiguration::DisableSharing The DisableSharing method disables sharing on this connection. It also disables all mappings on this connection. It does not disable Internet Connection Firewall or bridge configuration.
INetSharingConfiguration::EnableInternetFirewall The EnableInternetFirewall methods enables Internet Connection Firewall on this connection.
INetSharingConfiguration::EnableSharing The EnableSharing method enables sharing on this connection.
INetSharingConfiguration::get_EnumPortMappings The get_EnumPortMappings method retrieves an IEnumNetSharingPortMapping interface. Use this interface to enumerate the port mappings for this connection.
INetSharingConfiguration::get_InternetFirewallEnabled The get_InternetFirewallEnabled method determines whether Internet Connection Firewall is enabled on this connection.
INetSharingConfiguration::get_SharingConnectionType The get_SharingConnectionType method determines the type of sharing that is enabled on this connection.
INetSharingConfiguration::get_SharingEnabled The get_SharingEnabled method determines whether sharing is enabled on this connection.
INetSharingConfiguration::RemovePortMapping The RemovePortMapping method removes a service port mapping from the list of mappings for this connection.


Minimum supported client Windows XP [desktop apps only]
Minimum supported server None supported
Target Platform Windows
Header netcon.h

See also


Internet Connection Sharing and Internet Connection Firewall Interfaces

Internet Connection Sharing and Internet Connection Firewall Reference