Add Method of the IFPCApplicationFilters Interface
The Add method creates a new FPCApplicationFilter object in the collection and returns a reference to it.
C++
Syntax
HRESULT Add(
[in] BSTR Guid,
[in] BSTR Name,
[out] IFPCApplicationFilter** ppNewAppFilter
);
Parameters
Guid
Required. BSTR that specifies the string-formatted globally unique identifier (GUID) of the application filter to be registered.Name
Required. BSTR that specifies the display name of the application filter to be registered.ppNewAppFilter
Address of an interface pointer that on return points to the new IFPCApplicationFilter 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 Guid As String, _
ByVal Name As String _
) As FPCApplicationFilter
Parameters
- Guid
Required. String that specifies the string-formatted globally unique identifier (GUID) of the application filter to be registered. - Name
Required. String that specifies the display name of the application filter to be registered.
Return Value
This method returns a reference to an FPCApplicationFilter object if successful. Otherwise, an error is raised that can be intercepted by using an error handler.
Remarks
For an application filter to work on a Forefront TMG computer, its dynamic-link library (DLL) and other necessary files must be copied to the computer, an object representing it must be created in the FPCApplicationFilters collection for the computer's array, and it must be registered as an extension of the Microsoft Firewall service on the computer by including a reference to it in the computer's InstalledApplicationFilters property. When the Firewall service starts, it creates an instance of the filter object for each application filter that is registered on the Forefront TMG computer and enabled.
When the Add method is called on an array member to register an application filter in an array, a reference to the new FPCApplicationFilter object is automatically created in the FPCRefs collection held in the InstalledApplicationFilters property of the local Forefront TMG computer. The Add method should not be called on two members of the same array simultaneously.
When an enterprise with central array management is deployed, objects representing application filters can be added to the FPCApplicationFilters collection in the enterprise configuration. Creating an object for an application filter in the enterprise FPCApplicationFilters collection is optional, but provides several benefits.
When an enterprise with central array management is deployed, the Add method can be used to add an application filter to the configuration of an empty array.
For more information about registering application filters, see Filter Setup.
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
Send comments about this topic to Microsoft
Build date: 6/30/2010