Microsoft Internet Security and Acceleration Server 2004 SDK

IFPCTunnelPortRanges::AddRange[C++]

FPCTunnelPortRanges.AddRange [Visual Basic]

[C++]

The AddRange method creates a new FPCTunnelPortRange object in the collection and returns a reference to it.

HRESULT AddRange(
  BSTR bstrName,
  long lLowPort,
  long lHighPort,
  IFPCTunnelPortRange** ppNewDest
);

Parameters

bstrName
[in] Required. String value that specifies the name of the new tunnel port range.
lLowPort
[in] Required. A 32-bit integer that specifies the low end of the port range.
lHighPort
[in] Required. A 32-bit integer that specifies the high end of the port range.
ppNewDest
[out] Address of an interface pointer that on return points to the new IFPCTunnelPortRange interface created.

Return Values

This method can return one of the following:
[Visual Basic]

The AddRange method creates a new FPCTunnelPortRange object in the collection and returns a reference to it.

Function AddRange( _
  ByVal bstrName As String, _
  ByVal lLowPort As Long, _
  ByVal lHighPort As Long _
) As FPCTunnelPortRange

Parameters

bstrName
[in] Required. String value that specifies the name of the new tunnel port range.
lLowPort
[in] Required. A 32-bit integer that specifies the low end of the port range.
lHighPort
[in] Required. A 32-bit integer that specifies the high end of the port range.

Return Values

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

Example Code

The following Visual Basic example shows how to create a new tunnel port range consisting of a single port.

Dim root As FPC
Dim tpRanges As FPCTunnelPortRanges
Dim newRange As FPCTunnelPortRange

Set root = CreateObject("FPC.Root")
Set tpRanges = root.GetContainingArray.ArrayPolicy.WebProxy.TunnelPortRanges
set newRange = tpRanges.AddRange("SSL 3520", 3520, 3520)
tpRanges.Save

Requirements

Server: Requires Windows Server 2003 or Windows 2000.
Version: Requires Internet Security and Acceleration Server 2004.
Header: Declared in Msfpccom.idl.
Library: Use Microsoft Internet Security and Acceleration Server 2004 Administration Library.

See Also

FPCTunnelPortRanges