Events
Nov 19, 11 PM - Nov 21, 11 PM
Gain the competitive edge you need with powerful AI and Cloud solutions by attending Microsoft Ignite online.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Reads encrypted data from a protected surface.
HRESULT EncryptionBlt(
IDirect3DSurface9 *pSrcSurface,
IDirect3DSurface9 *pDstSurface,
UINT DstSurfaceSize,
VOID *pIV
);
pSrcSurface
Pointer to the protected surface.
pDstSurface
Pointer to a surface that receives the encrypted data.
DstSurfaceSize
The size of the surface memory that pDstSurface points to, in bytes. The size must be aligned to the value of BlockAlignmentSize in the driver capabilities structure; see Remarks.
pIV
Pointer to a buffer that receives the initialization vector (IV). The caller allocates this buffer, but the driver generates the IV.
If the encryption type is D3DCRYPTOTYPE_AES128_CTR (128-bit AES-CTR), pIV points to a D3DAES_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. This procedure enables the application to validate that the same IV is never used more than once with the same key pair.
For other encryption types, a different structure might be used, or the encryption might not use an IV.
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
If the driver supports this method, it sets the D3DCPCAPS_ENCRYPTEDREADBACK flag in the capabilities structure returned by the IDirect3DDevice9Video::GetContentProtectionCaps method.
If the driver sets the D3DCPCAPS_ENCRYPTEDREADBACKKEY capabilities flag, it means the driver uses a separate key to encrypt the data. To get this key, call the IDirect3DCryptoSession9::GetEncryptionBltKey method. Otherwise, the driver uses the session key to encrypt the data.
Allocate the destination surface (pDstSurface) as follows:
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 |
Events
Nov 19, 11 PM - Nov 21, 11 PM
Gain the competitive edge you need with powerful AI and Cloud solutions by attending Microsoft Ignite online.
Register now