GetDefaultContentDecryptionModuleFactory 函数 (comppkgsup.h)

重要

某些信息与预发行产品相关,在商业发布之前,该产品可能会进行实质性修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。

返回内置到 Windows 的指定密钥系统的 IMFContentDecryptionModuleFactory 的实现。

语法

HRESULT GetDefaultContentDecryptionModuleFactory(
  [in]  PCWSTR                            keySystem,
  [out] IMFContentDecryptionModuleFactory **contentDecryptionModuleFactory
);

参数

[in] keySystem

一个 PCWSTR,标识为其返回解密模块的密钥系统。

[out] contentDecryptionModuleFactory

如果找到指定的键系统,则接收指向 IMFContentDecryptionModuleFactory 实现的 指针;否则为 NULL。

返回值

包含以下值的 HRESULT:

说明
S_OK 成功。 即使找不到指定的密钥系统,此函数也会返回成功,但在这种情况下, contentDecryptionModuleFactory 参数为 NULL。
CO_E_NOTINITIALIZED 在调用函数之前未初始化 COM

注解

GetDefaultContentDescryptionModuleFactory 仅考虑内置于 Windows 的内容解密模块工厂,不考虑已从 Microsoft Store 下载的内容解密模块工厂。

建议应用使用 IMFMediaEngineClassFactory4::CreateContentDecryptionModuleFactory,因为此方法首先调用 GetDefaultContentDecryptionModuleFactory ,但同时搜索可能已从 Microsoft Store 下载的 IMFContentDecryptionModuleFactory 的任何匹配实现。

要求

要求
最低受支持的客户端 Windows 11,版本 24H2
标头 comppkgsup.h
Library Comppkgsup.lib
DLL Comppkgsup.dll