This documentation is archived and is not being maintained.

INetFwMgr::IsPortAllowed Method

Checks whether the application can listen to inbound traffic on the specified port.

Namespace:  Microsoft.TeamFoundation.Common
Assembly:  Microsoft.TeamFoundation.Common (in Microsoft.TeamFoundation.Common.dll)

void IsPortAllowed(
	[InAttribute] String^ imageFileName, 
	[InAttribute] NET_FW_IP_VERSION_ ipVersion, 
	[InAttribute] int portNumber, 
	[InAttribute] String^ localAddress, 
	[InAttribute] NET_FW_IP_PROTOCOL_ ipProtocol, 
	[OutAttribute] Object^% allowed, 
	[OutAttribute] Object^% restricted
)

Parameters

imageFileName
Type: System::String

The image file name of the process listening on the network. It must be a fully-qualified path, but may contain environment variables. If imageFileName is NULL, the function determines whether the port is allowed for all applications.

ipVersion
Type: Microsoft.TeamFoundation.Common::NET_FW_IP_VERSION_

IP version of the traffic. If localAddress is non-NULL, this must not be NET_FW_IP_VERSION_ANY.

portNumber
Type: System::Int32

Local IP port number of the traffic.

localAddress
Type: System::String

Either a dotted-decimal IPv4 address or an IPv6 hex address specifying the local address of the traffic. Typically, this is the address passed to bind. If localAddress is NULL, the function determines whether the port is allowed for all interfaces.

ipProtocol
Type: Microsoft.TeamFoundation.Common::NET_FW_IP_PROTOCOL_

IP protocol of the traffic, either NET_FW_IP_PROTOCOL_TCP or NET_FW_IP_PROTOCOL_UDP.

allowed
Type: System::Object%

Indicates by a value of VARIANT_TRUE or VARIANT_FALSE whether the port is allowed for at least some local interfaces and remote addresses.

restricted
Type: System::Object%

Indicates by a value of VARIANT_TRUE or VARIANT_FALSE whether some local interfaces or remote addresses are blocked for this port. For example, if the port is restricted to the local subnet only.

Show: