IFWXDataFilter::Detach method
Applies to: desktop apps only
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.
Syntax
HRESULT Detach();
Parameters
This method has no parameters.
Return value
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.
Examples
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
Minimum supported client |
None supported |
Minimum supported server |
Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only) |
Version |
Forefront Threat Management Gateway (TMG) 2010 |
Header |
Wspfwext.idl |
See also
Build date: 7/12/2010