MFCreateMediaSession function
Creates the Media Session in the application's process.
Syntax
HRESULT MFCreateMediaSession( IMFAttributes *pConfiguration, IMFMediaSession **ppMS );
Parameters
- pConfiguration
-
Pointer to the IMFAttributes interface. This parameter can be NULL. See Remarks.
- ppMS
-
Receives a pointer to the Media Session's IMFMediaSession interface. The caller must release the interface. Before releasing the last reference to the IMFMediaSession pointer, the application must call the IMFMediaSession::Shutdown method.
Return value
The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.
| Return code | Description |
|---|---|
|
The function succeeded. |
Remarks
If your application does not play protected content, you can use this function to create the Media Session in the application's process. To use the Media Session for protected content, you must call MFCreatePMPMediaSession.
You can use the pConfiguration parameter to specify any of the following attributes:
Requirements
|
Minimum supported client |
Windows Vista [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also