Share via


Add Method of the IFPCIPsOnNetworks Interface

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

C++

Syntax

HRESULT Add(
  [in]            BSTR NetworkName,
  [in, optional]  FpcIPSelectionMethods IPSelectionMethod,
  [in, optional]  BSTR IP,
  [out]           IFPCIPOnNetwork** ppNewIPOnNetwork
);

Parameters

  • NetworkName
    Required. BSTR that specifies the name of the network.

  • IPSelectionMethod
    Value from the FpcIPSelectionMethods enumerated type that indicates whether all of the IP addresses on the Forefront TMG computers, only the default IP address, or only the IP address specified in the IP parameter, will be selected. The default value indicates that all of the IP addresses on the Forefront TMG computers are selected.

  • IP
    BSTR that specifies the selected IP address. This parameter must be specified if the IPSelectionMethod parameter is set to fpcSpecifiedIPAddress, and it is ignored if the IPSelectionMethod parameter is not set or is set to any other value. The default value is an empty BSTR.

  • ppNewIPOnNetwork
    Address of an interface pointer that on return points to the new IFPCIPOnNetwork interface created.

Return Value

This method can return one of the following:

  • S_OK, indicating that the operation succeeded.
  • An error code, indicating that the operation failed. In this case, the [out] parameter returned is a null object.

Visual Basic

Syntax

Function Add( _
  ByVal NetworkName As String, _
  [ ByVal IPSelectionMethod As FpcIPSelectionMethods ], _
  [ ByVal IP As String ] _
) As FPCIPOnNetwork

Parameters

  • NetworkName
    Required. String that specifies the name of the network.

  • IPSelectionMethod
    Value from the FpcIPSelectionMethods enumerated type that indicates whether all of the IP addresses on the Forefront TMG computers, only the default IP address, or only the IP address specified in the IP parameter, will be selected. The default value indicates that all of the IP addresses on the Forefront TMG computers are selected.

  • IP
    String that specifies the selected IP address. This parameter must be specified if the IPSelectionMethod parameter is set to fpcSpecifiedIPAddress, and it is ignored if the IPSelectionMethod parameter is not set or is set to any other value. The default value is an empty string.

Return Value

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

Remarks

If the IPSelectionMethod parameter is set to fpcSpecifiedIPAddress, only a single IP address can be specified in the IP parameter. If you want to specify more than one IP address for listening for requests from a particular network, use this method to add the first IP address, retrieve the FPCIPOnNetwork object (IFPCIPOnNetwork interface in C++) created by this method, and then call the Add method on the IPAddresses property of this object (interface in C++) to add each additional IP address.

Requirements

Client Requires Windows 7 or Windows Vista.
Server Requires Windows Server 2008 R2 or Windows Server 2008 x64 Edition with SP2.
Version Requires Forefront Threat Management Gateway (TMG) 2010.
IDL

Declared in Msfpccom.idl.

DLL

Requires Msfpccom.dll.

See Also

FPCIPsOnNetworks

Send comments about this topic to Microsoft

Build date: 6/30/2010