IMFMediaSink::Shutdown method

Shuts down the media sink and releases the resources it is using.


HRESULT Shutdown();


This method has no parameters.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
The method succeeded.
The media sink was shut down.


If the application creates the media sink, it is responsible for calling Shutdown to avoid memory or resource leaks. In most applications, however, the application creates an activation object for the media sink, and the Media Session uses that object to create the media sink. In that case, the Media Session — not the application — shuts down the media sink. (For more information, see Activation Objects.)

After this method returns, all methods on the media sink return MF_E_SHUTDOWN, except for IUnknown methods and IMFMediaEventGenerator methods. The sink will not raise any events after this method is called.


Minimum supported client Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header mfidl.h
Library Mfuuid.lib

See also


Media Sinks