次の方法で共有


IFPCWebFilters::MoveDown method

Applies to: desktop apps only

The MoveDown method moves the specified filter one step down the list of filters.

Syntax

HRESULT MoveDown(
  [in]  long Index
);
FPCWebFilters.MoveDown( _
  ByVal Index As Long _
)

Parameters

  • Index [in]
    Required. Index (the current position indicated by the Order property) of the filter to move down.

Return value

C++

This method returns S_OK if the call is successful; otherwise, it returns an error code.

VB

This method has no return values. If the call is unsuccessful, an error is raised that can be intercepted by using an error handler.

Remarks

This method can be used to move a Web filter only into the positions of Web filters that have the same priority.

The MoveDown method is applicable only to the FPCWebFilters collection in an array configuration. The FPCWebFilters collection in the enterprise configuration is not ordered, and this method is disabled in it.

Examples

This VBScript script moves the first Web filter in the FPCWebFilters collection for the containing array one step down the list of Web filters, causing this Web filter to become the second Web filter to be called among the Web filters with the same priority. It does not include error handling.

' Create the root object.
Dim root  ' The FPCLib.FPC root object
Set root = CreateObject("FPC.Root")
' Declare the other objects needed.
Dim tmgArray  ' An FPCArray object
Dim filters   ' An FPCWebFilters collection
' Get references to the array object 
' and the Web filters collection.
Set tmgArray = root.GetContainingArray()
Set filters = tmgArray.Extensions.WebFilters
' Move the first Web filter in the collection
' one step down the list of Web filters.
If filters.Count > 1 Then
    filters.MoveDown  1
    filters.Save
    WScript.Echo "Done!"
Else
    WSCript.Echo "Two or more Web filters are needed."
End If

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

FPCWebFilters

MoveUp

 

 

Build date: 7/12/2010