IMFMediaSession::Close method (mfidl.h)

Closes the Media Session and releases all of the resources it is using.

Syntax

HRESULT Close();

Return value

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

Return code Description
S_OK
The method succeeded.
MF_E_SHUTDOWN
The Media Session has been shut down.

Remarks

This method is asynchronous. When the operation completes, the Media Session sends an MESessionClosed event.

After the Close method is called, the only valid methods on the Media Session are the following:

All other methods return MF_E_INVALIDREQUEST, or else queue an event with that error code.

Requirements

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

See also

IMFMediaSession