IDirect3DCryptoSession9::GetEncryptionBltKey method (d3d9.h)

Gets the cryptographic key used to decrypt the data returned by the IDirect3DCryptoSession9::EncryptionBlt method.

Syntax

HRESULT GetEncryptionBltKey(
  VOID *pReadbackKey,
  UINT KeySize
);

Parameters

pReadbackKey

A pointer to a byte array that receives the key. The key is encrypted using the session key.

KeySize

The size of the pReadbackKey array, in bytes. The size should match the size of the session key.

Return value

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

Remarks

This method applies only when the driver requires a separate content key for the EncryptionBlt method. If the driver requires a content key, it sets the D3DCPCAPS_ENCRYPTEDREADBACKKEY flag in the capabilities structure returned by the IDirect3DDevice9Video::GetContentProtectionCaps method. Otherwise, the driver uses the session key to encrypt the data.

Each time this method is called, the driver generates a new key.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header d3d9.h

See also

GPU-Based Content Protection

IDirect3DCryptoSession9