Export (0) Print
Expand All

INetFwPolicy2::LocalPolicyModifyState method

The LocalPolicyModifyState attribute determines if adding or setting a rule or group of rules will take effect in the current firewall profile.

Syntax


Function LocalPolicyModifyState( _
  ByRef modifyState _
)

Parameters

modifyState [out]

Indicates whether the local policy can be modified.

ValueMeaning
NET_FW_MODIFY_STATE_OK

Changing or adding a firewall rule or firewall group will take effect for the current profile.

NET_FW_MODIFY_STATE_GP_OVERRIDE

Changing or adding a firewall rule or firewall group will not take effect for the current profile because the firewall is controlled by group policy.

NET_FW_MODIFY_STATE_INBOUND_BLOCKED

Changing or adding a firewall rule or firewall group will not take effect for the current profile because unsolicited inbound traffic is not allowed.

 

Return value

C++

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
ACCESSDENIED

The operation was aborted due to permissions issues.

E_POINTER

The method failed because a pointer was invalid.

 

VB

Returns a numeric value which indicates whether the local policy can be modified.

The return value can be one of the following values.

Return codeDescription
NET_FW_MODIFY_STATE_OK

The state can be modified.

NET_FW_MODIFY_STATE_GP_OVERRIDE

The state can't be modified due to group policy override.

NET_FW_MODIFY_STATE_INBOUND_BLOCKED

The state can't be modified due to no exceptions being allowed.

 

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Netfw.h

DLL

FirewallAPI.dll

See also

INetFwPolicy2

 

 

Build date: 11/16/2013

Community Additions

ADD
Show:
© 2014 Microsoft