INetFwOpenPort interface (netfw.h)

[The Windows Firewall API is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. For Windows Vista and later, use of the Windows Firewall with Advanced Security API is recommended.]

The INetFwOpenPort interface provides access to the properties of a port that has been opened in the firewall.

Inheritance

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

Methods

The INetFwOpenPort interface has these methods.

 
INetFwOpenPort::get_BuiltIn

Indicates whether the port is defined by the system.
INetFwOpenPort::get_Enabled

Indicates whether the settings for this port are currently enabled. (Get)
INetFwOpenPort::get_IpVersion

Specifies the IP version setting for this port. (Get)
INetFwOpenPort::get_Name

Specifies the friendly name of this port. (Get)
INetFwOpenPort::get_Port

Specifies the host-ordered port number for this port. (Get)
INetFwOpenPort::get_Protocol

Specifies the protocol type setting for this port. (Get)
INetFwOpenPort::get_RemoteAddresses

Specifies a set of remote addresses from which the port can listen for traffic. (Get)
INetFwOpenPort::get_Scope

Controls the network scope from which the port can listen. (INetFwOpenPort.get_Scope)
INetFwOpenPort::put_Enabled

Indicates whether the settings for this port are currently enabled. (Put)
INetFwOpenPort::put_IpVersion

Specifies the IP version setting for this port. (Put)
INetFwOpenPort::put_Name

Specifies the friendly name of this port. (Put)
INetFwOpenPort::put_Port

Specifies the host-ordered port number for this port. (Put)
INetFwOpenPort::put_Protocol

Specifies the protocol type setting for this port. (Put)
INetFwOpenPort::put_RemoteAddresses

Specifies a set of remote addresses from which the port can listen for traffic. (Put)
INetFwOpenPort::put_Scope

Controls the network scope from which the port can listen. (INetFwOpenPort.put_Scope)

Remarks

Ports with their BuiltIn property set to true (VARIANT_TRUE) are system specified and cannot be removed.

When creating new ports, this interface is supported by the HNetCfg.FWOpenPort COM object.

For reading or modifying existing ports, instances of this interface are retrieved through the INetFwOpenPorts collection.

All configuration changes take effect immediately.

Requirements

Requirement Value
Minimum supported client Windows Vista, Windows XP with SP2 [desktop apps only]
Minimum supported server Windows Server 2003 with SP1 [desktop apps only]
Target Platform Windows
Header netfw.h

See also

IDispatch

INetFwOpenPorts

IUnknown