Microsoft Internet Security and Acceleration Server 2004 SDK |
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();
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.
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; }
Server: Requires Windows Server 2003 or
Windows 2000.
Version: Requires Internet Security and Acceleration
Server 2004.
Header: Declared in Wspfwext.idl.