Microsoft Internet Security and Acceleration Server 2000

IFWXFilter::AttachToSession Method

Creates a session filter object when the Firewall service detects an event for which the filter is registered. AttachToSession also indicates the set of events that the session filter will handle. This set of events includes the events requested in FilterInit. The events for which the filter is registered are received in a FWXFilterHookEvents structure.

The Firewall service object calls this interface when it detects an event for which the filter is registered.

HRESULT AttachToSession(
  IFWXSession *piSession, 
  IFWXSessionFilter **piSessionFilter, 
  PFilterHookEvents *ppFilterHookEvents
);

Parameters

piSession
[in] Pointer to the IFWXSession interface associated with the session to be monitored.
piSessionFilter
[out] Address of a variable that receives a pointer to the IFWXSessionFilter interface on the session filter object. The session filter object receives event notifications for the session.
ppFilterHookEvents
[out] Pointer to a PFilterHookEvents variable. This must be set to refer to a FwxFilterHookEvents structure containing the initial set of events that the filter monitors. Use the CoTaskMemAlloc function to allocate the structure. IFWXFirewall::DuplicateFilterHookEvents creates a duplicate of the FwxFilterHookEvents structure in a buffer that can be returned by IFWXFilter::AttachToSession.

Return Values

S_OK
The method succeeded.
E_OUTOFMEMORY
Insufficient memory or resources to process the event. This will cause the request that generated the event to fail.

See Also

IFWXFirewall::DuplicateFilterHookEvents