Microsoft Internet Security and Acceleration Server 2000

IFWXSession::SetDataFilterFactory Method

Allows a filter to set a data filter factory for events for which the filter is not registered. This method can be used to reduce the number of events for which a filter registers.

HRESULT SetDataFilterFactory(
  ProxyEventType eProxyEvent,
  LPSOCKADDR Address,
  DWORD AddressLength,
  IClassFactory *pIClassFactory,
  DataFilterPriorityClass PriorityClass,
  IUnknown *punkFilterContext,
  DWORD dwFlags,
  IFWXFirewallAction **ppFirewallAction
);

Parameters

eProxyEvent
[in] Type of event for which a data filter is requested. This can be one of the following values from the FwxFirewallEventType enumeration:

fwx_Connect_Tcp
fwx_Bind_Udp
fwx_AcceptedConnection
fwx_Udp_Destination

Address
[in] Pointer to a sockaddr structure that contains the address and port for events which should cause a data filter to be instantiated and attached. If eProxyEvent is fwx_Connect_Tcp or fwx_Udp_Destination, the address is the remote address. If eProxyEvent is fwx_Bind_Udp or fwx_AcceptedConnection, the address is the bind address. The address must be of type AF_INET, and can be either a specific IP address or INADDR_ANY.
AddressLength
[in] Length, in bytes, of the structure pointed to by the Address parameter.
pIClassFactory
[in] Pointer to a class factory for objects that support the IFWXDataFilter interface.
PriorityClass
[in] Priority class in which the data filter created will be attached. This is a value from the FwxDataFilterPriorityClass enumerated type.
punkFilterContext
[in] Pointer to an optional interface that can be used to pass context information to the data filter. This interface will be passed to IFWXDataFilter::SetSockets. This parameter can be NULL.
dwFlags
Specifies the flags for the call. Any combination of the following values is acceptable for the dwFlags parameter.
Value Description
FWX_FLAG_ADDRESS_BASED The connection for which the data filter is needed may be created by a different process by using the same address.

ppFirewallAction
[out] Address of a buffer that received a pointer to the IFWXFirewallAction interface on the proxy action object created as a result of this call. This parameter can be NULL

Remarks

This method is an alternative to registering to the corresponding event, comparing the address, and calling IFWXConnection::AttachDataFilter. The Firewall service creates a data filter by using the COM interface IClassFactory, when the specified event is detected. The data filter is then attached to the appropriate connection.