IMFContentDecryptionModule::CreateSession 方法 (mfcontentdecryptionmodule.h)

创建一个 IMFContentDecryptionModuleSession 对象,该对象表示内容解密模块 (CDM) 会话。

语法

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

参数

sessionType

MF_MEDIAKEYSESSION_TYPE的成员,指定要创建的 CDM 会话的类型。

callbacks

用于接收密钥状态更改更新的 IMFContentDecryptionModuleSessionCallbacks 对象。

session

接收创建的 IMFContentDecryptionModuleSession 对象。

返回值

如果成功,则返回 S_OK。

注解

CreateSession 基于加密媒体扩展规范的 createSession

要求

要求
最低受支持的客户端 Windows 10版本 2004 (10.0;内部版本 19041)
最低受支持的服务器 Windows Server 版本 2004 (10.0;内部版本 19041)
标头 mfcontentdecryptionmodule.h