Click to Rate and Give Feedback
MSDN
MSDN Library
Networking
Windows Firewall
INetFwRule
 INetFwRule::LocalPorts Property

  Switch on low bandwidth view
INetFwRule::LocalPorts Property

Specifies the list of local ports for this rule.

Syntax (put)

C++
HRESULT put_LocalPorts(
  [in]   BSTR portNumbers
);

Parameters

portNumbers [in]

Sets the comma-delimited list of local ports for this rule. This list must contain no spaces.

ValueMeaning
"*"

All local ports are affected by this rule.

"RPC"

RPC ports are affected by this rule.

"RPC-EPMap"

RPC Endpoint Mapper ports are affected by this rule.

"Teredo"

Protected local IPv6 ports are affected by this rule.

 

Syntax (get)

C++
 HRESULT get_LocalPorts(
  [out]  BSTR *portNumbers
);

Parameters

portNumbers [out]

Gets the list of local ports for this rule.

Return Value

If the method succeeds, the return value is S_OK.

If the method fails, the return value is one of the following error codes.

Return codeDescription
E_ACCESSDENIED

The operation was aborted due to permissions issues.

E_INVALIDARG

The method failed due to an invalid parameter.

E_OUTOFMEMORY

The method was unable to allocate required memory.

E_POINTER

The method failed due to an invalid pointer.

 

Syntax

VBScript
Property LocalPorts As String

Property Value

The list of local ports.

Remarks

This property is optional.

Also see the restrictions on changing properties described in the Remarks section of INetFwRule interface page.

The Protocol property must be set before the LocalPorts property or an error will be returned.

Requirements

Minimum supported clientWindows Vista
Minimum supported serverNone supported
HeaderNetfw.h
DLLFirewallAPI.dll

See Also

INetFwRule

Send comments about this topic to Microsoft

Build date: 6/25/2009

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