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();
Implementations of this method should handle any run-time error and return S_OK.
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; }
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.
Server | Requires Windows Server 2008. |
---|---|
Version | Requires Forefront Threat Management Gateway (TMG). |
Header |
Declared in Wspfwext.idl. |
Send comments about this topic to Microsoft
Build date: 11/30/2009
© 2008 Microsoft Corporation. All rights reserved.