Skip to content

Latest commit

 

History

History
108 lines (81 loc) · 5.12 KB

nf-d3d11-id3d11videocontext-encryptionblt.md

File metadata and controls

108 lines (81 loc) · 5.12 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:d3d11.ID3D11VideoContext.EncryptionBlt
ID3D11VideoContext::EncryptionBlt (d3d11.h)
Reads encrypted data from a protected surface. (ID3D11VideoContext.EncryptionBlt)
EncryptionBlt
EncryptionBlt method [Media Foundation]
EncryptionBlt method [Media Foundation]
ID3D11VideoContext interface
ID3D11VideoContext interface [Media Foundation]
EncryptionBlt method
ID3D11VideoContext.EncryptionBlt
ID3D11VideoContext::EncryptionBlt
d3d11/ID3D11VideoContext::EncryptionBlt
mf.id3d11videocontext_encryptionblt
mf\id3d11videocontext_encryptionblt.htm
mf
2BBD0BC2-53D9-435E-835C-20A992118329
12/05/2018
EncryptionBlt, EncryptionBlt method [Media Foundation], EncryptionBlt method [Media Foundation],ID3D11VideoContext interface, ID3D11VideoContext interface [Media Foundation],EncryptionBlt method, ID3D11VideoContext.EncryptionBlt, ID3D11VideoContext::EncryptionBlt, d3d11/ID3D11VideoContext::EncryptionBlt, mf.id3d11videocontext_encryptionblt
d3d11.h
Windows
Windows 8 [desktop apps \| UWP apps]
Windows Server 2012 [desktop apps \| UWP apps]
Windows
19H1
ID3D11VideoContext::EncryptionBlt
d3d11/ID3D11VideoContext::EncryptionBlt
c++
APIRef
kbSyntax
COM
d3d11.h
ID3D11VideoContext.EncryptionBlt

ID3D11VideoContext::EncryptionBlt

-description

Reads encrypted data from a protected surface.

-parameters

-param pCryptoSession [in]

A pointer to the ID3D11CryptoSession interface of the cryptographic session.

-param pSrcSurface [in]

A pointer to the ID3D11Texture2D interface of the protected surface.

-param pDstSurface [in]

A pointer to the ID3D11Texture2D interface of the surface that receives the encrypted data.

-param IVSize [in]

The size of the pIV buffer, in bytes.

-param pIV [in]

A pointer to a buffer that receives the initialization vector (IV). The caller allocates this buffer, but the driver generates the IV.

For 128-bit AES-CTR encryption, pIV points to a D3D11_AES_CTR_IV structure. When the driver generates the first IV, it initializes the structure to a random number. For each subsequent IV, the driver simply increments the IV member of the structure, ensuring that the value always increases. The application can validate that the same IV is never used more than once with the same key pair.

-returns

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

-remarks

Not all drivers support this method. To query the driver capabilities, call ID3D11VideoDevice::GetContentProtectionCaps and check for the D3D11_CONTENT_PROTECTION_CAPS_ENCRYPTED_READ_BACK flag in the Caps member of the D3D11_VIDEO_CONTENT_PROTECTION_CAPS structure.

Some drivers might require a separate key to decrypt the data that is read back. To check for this requirement, call GetContentProtectionCaps and check for the D3D11_CONTENT_PROTECTION_CAPS_ENCRYPTED_READ_BACK_KEY flag. If this flag is present, call ID3D11VideoContext::GetEncryptionBltKey to get the decryption key.

This method has the following limitations:

  • Reading back sub-rectangles is not supported.
  • Reading back partially encrypted surfaces is not supported.
  • The protected surface must be either an off-screen plain surface or a render target.
  • The destination surface must be a D3D11_USAGE_STAGING resource.
  • The protected surface cannot be multisampled.
  • Stretching and colorspace conversion are not supported.

This function does not honor a D3D11 predicate that may have been set.

If the application uses D3D11 queries, this function may not be accounted for with D3D11_QUERY_EVENT and D3D11_QUERY_TIMESTAMP when using feature levels lower than 11. D3D11_QUERY_PIPELINE_STATISTICS will not include this function for any feature level.

-see-also

ID3D11VideoContext