Add Method of the IFPCRefs Interface

The Add method creates a new FPCRef object in the collection and returns a reference to it.

[C++]

Syntax

HRESULT Add(
  [in]   BSTR Name,
  [in]   FpcIncludeStatus IncludeStatus,
  [out]  IFPCRef** ppNewRef
);

Parameters

Name
Required. BSTR that specifies the name of the item that will be referenced by the new object.
IncludeStatus

Required. Value from the FpcIncludeStatus enumerated type that specifies whether the referenced item will be included in or excluded from the list of items to which a rule applies.

ppNewRef

Address of an interface pointer that on return points to the new IFPCRef interface created.

Return Value

This method can return one of the following:

[Visual Basic]

Syntax

Function Add( _
  ByVal Name As String, _
  ByVal IncludeStatus As FpcIncludeStatus _
) As FPCRef

Parameters

Name
Required. String that specifies the name of the item that will be referenced by the new object.
IncludeStatus

Required. Value from the FpcIncludeStatus enumerated type that specifies whether the referenced item will be included in or excluded from the list of items to which a rule applies.

Return Value

This method returns a reference to the FPCRef object added if the call is successful. Otherwise, an error is raised that can be intercepted by using an error handler.

Example Code

For VBScript code examples that show how to use this method to add references to networks, URL sets, and protocols for use in access rules, see Adding an Access Rule and Controlling Access by a Schedule and a User Set.

Remarks

The IncludeStatus parameter must be set even when the collection is accessed through a property for which this parameter is meaningless, such as the SpecifiedProtocols property of the FPCAccessProperties object. Here the inclusion of the specified protocols in the rule, or their exclusion from the rule, is indicated by the ProtocolSelectionMethod property.

This method creates an FPCRef object that references an item with the same scope (array or enterprise) as the object through which the FPCRefs collection was accessed. The AddScopedItem method can be used to create an FPCRef object that references an item with a specified scope.

Requirements

Client Requires Windows Vista or Windows XP.
Server Requires Windows Server 2008.
Version Requires Forefront Threat Management Gateway (TMG).
IDL

Declared in Msfpccom.idl.

DLL

Requires Msfpccom.dll.

See Also

FPCRefs


Send comments about this topic to Microsoft

Build date: 11/30/2009

© 2008 Microsoft Corporation. All rights reserved.

508 Resource Limit Is Reached

Resource Limit Is Reached

The website is temporarily unable to service your request as it exceeded resource limit. Please try again later.