Microsoft Internet Security and Acceleration Server 2004 SDK

IFWXSessionFilter::Detach

The Detach method detaches the session filter from its session. This method should release all references that the session filter object holds on the session and any related objects.

HRESULT Detach();

Parameters

This method has no parameters.

Return Values

Implementations of this method should return the following:
S_OK
The method succeeded.
E_FAIL
The method failed. This will cause the Firewall service to generate an alert.

Remarks

This method is typically called by the Microsoft Firewall service when the applicable session is about to be shut down.

Example Code

The following is an example implementation of the Detach method.

HRESULT CMySessionFilter::Detach()
{
	// Assume that m_spSession is defined as CComPtr<IFWXSession>
	// and that IFWXSession::Release() is called 
	// by the assignment operator.
	Lock();
	m_spSession = NULL;
	Unlock();
 
	return S_OK;
}

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