OPMGetVideoOutputsFromHMONITOR function (opmapi.h)

Creates an Output Protection Manager (OPM) object for each physical monitor that is associated with a particular HMONITOR handle.

Syntax

HRESULT OPMGetVideoOutputsFromHMONITOR(
  [in]  HMONITOR                   hMonitor,
  [in]  OPM_VIDEO_OUTPUT_SEMANTICS vos,
  [out] ULONG                      *pulNumVideoOutputs,
  [out] IOPMVideoOutput            ***pppOPMVideoOutputArray
);

Parameters

[in] hMonitor

The monitor handle for which to create OPM objects. There are several functions that return HMONITOR values. For more information, see the topic Multiple Display Monitors Functions in the Windows graphics device interface (GDI) documentation.

[in] vos

A member of the OPM_VIDEO_OUTPUT_SEMANTICS enumeration.

Value Meaning
OPM_VOS_OPM_SEMANTICS
The returned IOPMVideoOutput pointers will use OPM semantics.
OPM_VOS_COPP_SEMANTICS
The returned IOPMVideoOutput pointers will use Certified Output Protection Protocol (COPP) semantics.

[out] pulNumVideoOutputs

Receives the number of IOPMVideoOutput pointers returned in the pppOPMVideoOutputArray parameter.

[out] pppOPMVideoOutputArray

Receives a pointer to an array of IOPMVideoOutput pointers. Each IOPMVideoOutput pointer is associated with a single physical monitor. The caller must release each pointer in the array, and call CoTaskMemFree to free the array.

Return value

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

Remarks

A single HMONITOR handle can be associated with several physical monitors. Each physical monitor has its own connector. The application must set the protection mechanism individually for each physical monitor, using the IOPMVideoOutput pointers returned in pppOPMVideoOutputArray.

The IOPMVideoOutput interface has two modes of behavior, depending on the value of the vos parameter. If vos is OPM_VOS_COPP_SEMANTICS, IOPMVideoOutput uses COPP semantics. This mode is intended for backward compatibility with COPP. If vos is OPM_VOS_OPM_SEMANTICS, IOPMVideoOutput uses the newer OPM semantics. Differences in behavior are noted on the reference page for each method. The mode does not change during the lifetime of the object.

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
Library Dxva2.lib
DLL Dxva2.dll

See also

OPM Functions