IMFSampleProtection::GetProtectionCertificate method

Retrieves the sample protection certificate.

Syntax


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

Parameters

dwVersion [in]

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.

ppCert [out]

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

pcbCert [out]

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 codeDescription
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

Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Mfidl.h

Library

Mfuuid.lib

See also

IMFSampleProtection

 

 

Show: