The AddRange method creates a new FPCTunnelPortRange object in the collection and returns a reference to it.
HRESULT AddRange( [in] BSTR bstrName, [in] long lLowPort, [in] long lHighPort, [out] IFPCTunnelPortRange** ppNewDest );
Required. String value that specifies the name of the new tunnel port range.
Required. A 32-bit integer that specifies the low end of the port range. The range of permissible values is from 1 through 65535.
Required. A 32-bit integer that specifies the high end of the port range. The range of permissible values is from 1 through 65535.
Address of an interface pointer that on return points to the new IFPCTunnelPortRange interface created.
This method can return one of the following:
Function AddRange( _ ByVal bstrName As String, _ ByVal lLowPort As Long, _ ByVal lHighPort As Long _ ) As FPCTunnelPortRange
Required. String value that specifies the name of the new tunnel port range.
Required. A 32-bit integer that specifies the low end of the port range. The range of permissible values is from 1 through 65535.
Required. A 32-bit integer that specifies the high end of the port range. The range of permissible values is from 1 through 65535.
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.
' Define the constants needed. Const NewRangeName = "SSL 3520" Const NewRangePort = "3520" ' Create the root object. Dim root ' The FPCLib.FPC root object Set root = CreateObject("FPC.Root") 'Declare the other objects needed. Dim isaArray ' a Forefront TMG array object Dim tpRanges ' An FPCTunnelPortRanges collection Dim newRange ' An FPCTunnelPortRange object ' Get a reference to the array and to ' the collection of tunnel port ranges. Set isaArray = root.GetContainingArray() Set tpRanges = isaArray.ArrayPolicy.WebProxy.TunnelPortRanges ' Create a new tunnel port range. Set newRange = tpRanges.AddRange(NewRangeName, NewRangePort, NewRangePort) ' Save the changes to the collection of tunnel port ranges ' with fResetRequiredServices set to True to restart the Firewall service. tpRanges.Save True
After the FPCTunnelPortRange collection is modified by calling this method, the changes must be written to persistent storage by calling the Save method, and the Microsoft Firewall service must be restarted for the changes to take effect. For more information about restarting the Firewall service to apply changes, see Restarting Services After Configuration Changes.
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. |
Send comments about this topic to Microsoft
Build date: 11/30/2009
© 2008 Microsoft Corporation. All rights reserved.