IMFContentDecryptionModule::CreateSession method (mfcontentdecryptionmodule.h)

Creates a IMFContentDecryptionModuleSession object representing a Content Decryption Module (CDM) session.

Syntax

HRESULT CreateSession(
  MF_MEDIAKEYSESSION_TYPE                    sessionType,
  IMFContentDecryptionModuleSessionCallbacks *callbacks,
  IMFContentDecryptionModuleSession          **session
);

Parameters

sessionType

A member of the MF_MEDIAKEYSESSION_TYPE that specifies the type of CDM session to create.

callbacks

An IMFContentDecryptionModuleSessionCallbacks object for receiving key status change updates.

session

Receives the created IMFContentDecryptionModuleSession object.

Return value

Returns S_OK on success.

Remarks

CreateSession is based on the Encrypted Media Extension specification's createSession.

Requirements

Requirement Value
Minimum supported client Windows 10, version 2004 (10.0; Build 19041)
Minimum supported server Windows Server, version 2004 (10.0; Build 19041)
Header mfcontentdecryptionmodule.h