MFCreatePMPMediaSession function (mfidl.h)

Creates an instance of the Media Session inside a Protected Media Path (PMP) process.

Syntax

HRESULT MFCreatePMPMediaSession(
  DWORD           dwCreationFlags,
  IMFAttributes   *pConfiguration,
  IMFMediaSession **ppMediaSession,
  IMFActivate     **ppEnablerActivate
);

Parameters

dwCreationFlags

A member of the MFPMPSESSION_CREATION_FLAGS enumeration that specifies how to create the session object.

pConfiguration

A pointer to the IMFAttributes interface. This parameter can be NULL. See Remarks.

ppMediaSession

Receives a pointer to the PMP 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.

ppEnablerActivate

Receives a pointer to the IMFActivate interface or the value NULL. If non-NULL, the caller must release the interface. See Remarks.

Return value

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

Return code Description
S_OK
The function succeeded.

Remarks

You can use the pConfiguration parameter to set any of the following attributes:

If this function cannot create the PMP Media Session because a trusted binary was revoked, the ppEnablerActivate parameter receives an IMFActivate interface pointer. The application can use this pointer to create a content enabler object, which can then be used to download an updated binary:
  1. Call IMFActivate::ActivateObject with the interface identifier IID_IMFContentEnabler to get an IMFContentEnabler interface pointer.
  2. Use that interface to download the updated binary.
  3. Call MFCreatePMPMediaSession again.
If the function successfully creates the PMP Media Session, the ppEnablerActivate parameter receives the value NULL.

Do not make calls to the PMP Media Session from a thread that is processing a window message sent from another thread. To test whether the current thread falls into this category, call InSendMessage.

Requirements

Requirement Value
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 Mf.lib
DLL Mf.dll

See also

MFCreateMediaSession

Media Foundation Functions

PMP Media Session

Protected Media Path