IAMCertifiedOutputProtection::KeyExchange method

The KeyExchange method returns the graphics driver's certificate.

Syntax


HRESULT KeyExchange(
  [out] GUID  *pRandom,
  [out] BYTE  **VarLenCertGH,
  [out] DWORD *pdwLengthCertGH
);

Parameters

pRandom [out]

Receives a 128-bit random number, generated by the graphics driver. Use this value in the IAMCertifiedOutputProtection::SessionSequenceStart method.

VarLenCertGH [out]

Receives a pointer to a buffer containing the graphics driver's certificate. The method allocates the memory for the buffer. The caller must release the memory by calling CoTaskMemFree.

pdwLengthCertGH [out]

Receives the length of the buffer returned in VarLenCertGH.

Return value

Returns an HRESULT value. Possible values include the following.

Return codeDescription
S_OK

Success.

E_UNEXPECTED

Invalid state. Possibly the application passed unexpected data, or called IAMCertifiedOutputProtection methods in the wrong order. If this error occurs, the application should release the current instance of the VMR.

VFW_E_NO_COPP_HW

The display device does not support COPP; or the VMR has not connected to a display device yet.

ERROR_GRAPHICS_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE

No monitors correspond to the display device. This error can occur if the display mode changes; or the user turns off a monitor or removes a monitor.

 

Remarks

The graphics driver's certificate contains the driver's public encryption key.

If this method returns E_UNEXPECTED, the application should create a new COPP session by releasing the VMR, creating a new instance of the VMR, and calling KeyExchange again on the new instance.

Requirements

Minimum supported client

Windows XP with SP2 [desktop apps only]

Minimum supported server

Windows Server 2003 R2 [desktop apps only]

Header

Strmif.h (include Dshow.h)

Library

Strmiids.lib

See also

IAMCertifiedOutputProtection Interface
Using Certified Output Protection Protocol (COPP)

 

 

Show: