IDirect3DDevice9Video::CreateCryptoSession method (d3d9.h)

Creates a cryptographic session to encrypt video content that is sent to the display driver.

Syntax

HRESULT CreateCryptoSession(
  const GUID              *pCryptoType,
  const GUID              *pDecodeProfile,
  IDirect3DCryptoSession9 **ppCryptoSession,
  HANDLE                  *pCryptoHandle
);

Parameters

pCryptoType

Pointer to a GUID that specifies the type of encryption to use. The following GUIDs are defined.

pDecodeProfile

Type: GUID

A pointer to a GUID that specifies the DirectX Video Acceleration 2 (DXVA-2) decoding profile. For a list of possible values, see IDirectXVideoDecoderService::GetDecoderDeviceGuids. If DXVA-2 decoding will not be used, set this parameter to NULL.

pCaps

Type: D3DCONTENTPROTECTIONCAPS

A pointer to a D3DCONTENTPROTECTIONCAPS structure. The method fills in this structure with the driver's content protection capabilities.

pDecodeProfile

Pointer to a GUID that specifies the DirectX Video Acceleration 2 (DXVA-2) decoding profile. For a list of possible values, see IDirectXVideoDecoderService::GetDecoderDeviceGuids. If DXVA-2 decoding will not be used, set this parameter to NULL.

ppCryptoSession

Receives a pointer to the IDirect3DCryptoSession9 interface. The caller must release the interface.

pCryptoHandle

Receives a handle for the session.

Return value

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

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

IDirect3DDevice9Video