Freigeben über


IAMCertifiedOutputProtection::KeyExchange

 
Microsoft DirectShow 9.0

IAMCertifiedOutputProtection::KeyExchange

This topic applies only to Windows XP Service Pack 2 or later.

The KeyExchange method returns the graphics driver's certificate.

Syntax

  HRESULT KeyExchange(
    GUID *pRandom,
    BYTE **VarLenCertGH,
    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 Values

Returns an HRESULT value. Possible values include the following.

Return Code Description
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.

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

Header: Declared in Strmif.h; include Dshow.h.

Library: Use Strmiids.lib.

See Also