Microsoft Internet Security and Acceleration Server 2004 SDK

IFWXSessionFilter::FirewallEventHandler

The FirewallEventHandler method provides the event sink for Microsoft Firewall service events related to the session to which the session filter is attached.

HRESULT FirewallEventHandler(
  const FirewallEvent* pFirewallEvent
);

Parameters

pFirewallEvent
[in] Pointer to a FwxFirewallEvent structure that describes the event for which this method is called and that receives information about the event. For more information, see the documentation for each event type.

Return Values

Implementations of this method should return S_OK if the call is successful; otherwise, they should return an error code.

Remarks

This method is called when an event occurs for which the filter is registered. In this method, you select an action based on the event data provided by the Firewall service.

Example Code

The following is an example implementation of the FirewallEventHandler method.

HRESULT STDMETHODCALLTYPE CMySessionFilter::FwxFirewallEventHandler(
						FirewallEvent *pEvent)
{
	switch (pEvent->EventType) {
	case fwx_Connect_Tcp:
		// Handle connect event.
	case fwx_Accept:
		// Handle accept event
....
	default:
		return E_NOTIMPL;
}

Requirements

Server: Requires Windows Server 2003 or Windows 2000.
Version: Requires Internet Security and Acceleration Server 2004.
Header: Declared in Wspfwext.idl.

See Also

IFWXSessionFilter, FwxFirewallEvent