Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Called when the filter is deactivated.
Syntax
HRESULT retVal = object.Terminate(hrStatus);
Parameters
hrStatus
Type: HRESULTSpecifies the exit code of the filter.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Examples
The following examples demonstrate the use of IImageDecodeFilter::Terminate to release and free resources associated with the filter:
STDMETHODIMP
CImageDecodeFilter::Terminate(HRESULT hrStatus)
{
if(m_pEventSink)
{
m_pEventSink->OnDecodeComplete(hrStatus);
m_pEventSink.Release();
}
if (m_pFormats)
CoTaskMemFree(m_pFormats);
return S_OK;
}