IMFSampleProtection::GetProtectionCertificate method (mfidl.h)

Retrieves the sample protection certificate.

Syntax

HRESULT GetProtectionCertificate(
  [in]  DWORD dwVersion,
  [out] BYTE  **ppCert,
  [out] DWORD *pcbCert
);

Parameters

[in] dwVersion

Specifies the version number of the sample protection scheme for which to receive a certificate. The version number is specified as a SAMPLE_PROTECTION_VERSION enumeration value.

[out] ppCert

Receives a pointer to a buffer containing the certificate. The caller must free the memory for the buffer by calling CoTaskMemFree.

[out] pcbCert

Receives the size of the ppCert buffer, in bytes.

Return value

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

Return code Description
S_OK
The method succeeded.
E_NOTIMPL
Not implemented.

Remarks

For certain version numbers of sample protection, the downstream component must provide a certificate. Components that do not support these version numbers can return E_NOTIMPL.

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 Mfuuid.lib

See also

IMFSampleProtection