Microsoft Internet Security and Acceleration Server 2004/2006 SDK
IFWXDataFilter::Detach

The Detach method detaches the data filter from the internal and external sockets attached to it. This method should release the references that the data filter object holds to the socket interfaces and to the connection.

HRESULT Detach();

Parameters

This method has no parameters.

Return Values

Implementations of this method should handle any run-time error and return S_OK.

Remarks

This method is called by the Microsoft Firewall service to free the data filter object when the connection has ended.

This method may also be called before the IFWXDataFilter::SetSockets method to ensure cleanup in case of failures.

Example Code

The following is an example implementation of the Detach method.

 
HRESULT STDMETHODCALLTYPE CMyDataFilter::Detach()
{
    // Assume that m_spExternalSocket and m_spInternalSocket 
    // are defined as CComPtr<IFWXSocket> and that 
    // m_spConnection is defined as CComPtr<IFWXConnection>.
    Lock();
    m_spExternalSocket = NULL;
    m_spInternalSocket = NULL;
    m_spConnection = NULL;
    Unlock();
    return S_OK;
}

Requirements

Server Requires Windows Server 2003. Requires Windows Server 2003 or Windows 2000 for ISA Server 2004 Standard Edition.
Version Requires Internet Security and Acceleration (ISA) Server 2006 or ISA Server 2004.
Header

Declared in Wspfwext.idl.

See Also

IFWXDataFilter

Page view tracker