Share via


IFPCAccessProperties::SpecifiedProtocols property

Applies to: desktop apps only

The SpecifiedProtocols property gets an FPCRefs collection that contains references to the FPCProtocolDefinition objects defining the protocols to which the rule applies or the protocols that are excluded from the rule.

This property is read-only.

Syntax

HRESULT get_SpecifiedProtocols(
  IFPCRefs **ppRefs
);
' Data type: FPCRefs

Property SpecifiedProtocols( _
  ByVal ppRefs As IFPCRefs _
) As FPCRefs

Property value

Reference to an FPCRefs collection that contains references to the protocols to which the rule applies or the protocols that are excluded from the rule.

Error codes

This property method returns S_OK if the call is successful; otherwise, it returns an error code.

Remarks

This property is read-only. It can be modified by calling the methods of the FPCRefs collection retrieved (the IFPCRefs interface retrieved in C++).

The ProtocolSelectionMethod property indicates whether the rule applies to all protocols, to the protocols referenced by this property, or to all protocols except the protocols referenced by this property.

Examples

The following Visual Basic code illustrates the use of the SpecifiedProtocols property.

  Dim root As New FPCLib.FPC
  Dim containingArray As FPCArray
  Dim policyRules As FPCPolicyRules
  Dim newRule As FPCPolicyRule  
  Set containingArray = root.GetContainingArray
  Set policyRules = containingArray.ArrayPolicy.PolicyRules
  Set newRule = policyRules.AddAccessRule("All Web Access")
  newRule.Action = fpcActionAllow
  newRule.Description = "Basic Web access to Everyone"
  newRule.Enabled = True
  newRule.AccessProperties.ProtocolSelectionMethod = fpcSpecifiedProtocols
  newRule.AccessProperties.SpecifiedProtocols.Add ("HTTP", fpcInclude)
  newRule.AccessProperties.SpecifiedProtocols.Add ("HTTPS", fpcInclude)
  newRule.SetAppliesAlways
  policyRules.Save

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only)

Version

Forefront Threat Management Gateway (TMG) 2010

IDL

Msfpccom.idl

DLL

Msfpccom.dll

See also

FPCAccessProperties

 

 

Build date: 7/12/2010