IFPCIPsOnNetworks::Add method

Applies to: desktop apps only

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

Syntax

HRESULT Add(
  [in]            BSTR NetworkName,
  [in, optional]  FpcIPSelectionMethods IPSelectionMethod,
  [in, optional]  BSTR IP,
  [out]           IFPCIPOnNetwork **ppNewIPOnNetwork
);
FPCIPsOnNetworks.Add( _
  ByVal NetworkName As String, _
  [ ByVal IPSelectionMethod As FpcIPSelectionMethods ], _
  [ ByVal IP As String ], _
  ByRef ppNewIPOnNetwork As IFPCIPOnNetwork _
) As FPCIPOnNetwork

Parameters

  • NetworkName [in]

    C++ Required. BSTR that specifies the name of the network.
    VB Required. String that specifies the name of the network.
  • IPSelectionMethod [in, optional]
    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 [in, optional]

    C++ 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.
    VB 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.
  • ppNewIPOnNetwork [out]
    Address of an interface pointer that on return points to the new IFPCIPOnNetwork interface created.

Return value

C++

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.

VB

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

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

FPCIPsOnNetworks

 

 

Build date: 7/12/2010