IOPMVideoOutput::FinishInitialization method (opmapi.h)

Completes the initialization sequence for an Output Protection Manager (OPM) session.

Syntax

HRESULT FinishInitialization(
  [in] const OPM_ENCRYPTED_INITIALIZATION_PARAMETERS *pParameters
);

Parameters

[in] pParameters

Pointer to an OPM_ENCRYPTED_INITIALIZATION_PARAMETERS structure. Initialize this structure as described in the Remarks session.

Return value

Returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The method succeeded.
ERROR_GRAPHICS_OPM_DRIVER_INTERNAL_ERROR
An unexpected error occurred the display driver.
ERROR_GRAPHICS_OPM_INVALID_ENCRYPTED_PARAMETERS
The encrypted parameters in pParameters are incorrect.

Remarks

This method is equivalent to the IAMCertifiedOutputProtection::SessionSequenceStart method in Certified Output Protection Protocol (COPP).

The pParameters parameter points to an OPM_ENCRYPTED_INITIALIZATION_PARAMETERS structure that contains a 256-byte array. Before calling the method, prepare this array as follows. First, concatenate the following numbers:

  • The 128-bit number returned in the prnRandomNumber parameter of the IOPMVideoOutput::StartInitialization method.
  • The AES signing key. This value is a 128-bit random number generated by the application.
  • The initial sequence number for OPM status requests. This value is a 32-bit random number generated by the application.
  • The initial sequence number for OPM commands. This value is a 32-bit random number generated by the application.
Encrypt this number with RAEAS-OAEP, encryption using the display driver's public encryption key. The public encryption key is contained in the certificate returned in the ppbCertificate parameter of the StartInitialization method.

The application must use cryptographically secure random numbers. The CryptGenRandom function is recommended, although not required.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header opmapi.h

See also

IOPMVideoOutput

Output Protection Manager