IAMCertifiedOutputProtection::KeyExchange method (strmif.h)
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The KeyExchange method returns the graphics driver's certificate.
Syntax
HRESULT KeyExchange(
[out] GUID *pRandom,
[out] BYTE **VarLenCertGH,
[out] DWORD *pdwLengthCertGH
);
Parameters
[out] pRandom
Receives a 128-bit random number, generated by the graphics driver. Use this value in the IAMCertifiedOutputProtection::SessionSequenceStart method.
[out] VarLenCertGH
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.
[out] pdwLengthCertGH
Receives the length of the buffer returned in VarLenCertGH.
Return value
Returns an HRESULT value. Possible values include the following.
Return code | Description |
---|---|
|
Success. |
|
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. |
|
The display device does not support COPP; or the VMR has not connected to a display device yet. |
|
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
Requirement | Value |
---|---|
Minimum supported client | Windows XP with SP2 [desktop apps only] |
Minimum supported server | Windows Server 2003 R2 [desktop apps only] |
Target Platform | Windows |
Header | strmif.h (include Dshow.h) |
Library | Strmiids.lib |