IMFMediaEngineClassFactory2::CreateMediaKeys2 method (mfmediaengine.h)

Creates a media keys object based on the specified key system.


HRESULT CreateMediaKeys2(
  [in]           BSTR         keySystem,
  [in]           BSTR         defaultCdmStorePath,
  [in, optional] BSTR         inprivateCdmStorePath,
  [out]          IMFMediaKeys **ppKeys


[in] keySystem

The media key system.

[in] defaultCdmStorePath

Points to the default file location for the store Content Decryption Module (CDM) data.

[in, optional] inprivateCdmStorePath

Points to a the inprivate location for the store Content Decryption Module (CDM) data. Specifying this path allows the CDM to comply with the application’s privacy policy by putting personal information in the file location indicated by this path.

[out] ppKeys

Receives the media keys.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.


Requirement Value
Minimum supported client Windows 8.1 [desktop apps only]
Minimum supported server Windows Server 2012 R2 [desktop apps only]
Target Platform Windows
Header mfmediaengine.h

See also