IDisplayPathInterop::CreateSourcePresentationHandle method (windows.devices.display.core.interop.h)

Creates an NT handle for controlling access to scanout on this path. A compositor application can choose to broker access to paths that it controls using these objects. Your application can call IDisplayDeviceInterop.OpenSharedHandle to create a DisplaySource object from this handle.

Syntax

HRESULT CreateSourcePresentationHandle(
  HANDLE *pValue
);

Parameters

pValue

Type: HANDLE*

A pointer to a HANDLE that receives the newly created source presentation object.

Return value

Type: HRESULT

This method returns S_OK if it succeeded, otherwise a failure code indicating why it failed. If it succeeded, then pValue will always point to the newly created handle.

Remarks

Multiple processes can have handles of the same object, enabling use of the object for interprocess synchronization or sharing. These object-sharing mechanisms are available.

Use the CloseHandle function to close the handle. The system closes the handle automatically when the process terminates. The object is destroyed when its last handle has been closed and its last interface reference has been released.

Requirements

Requirement Value
Minimum supported client Windows 10 Build 20348
Minimum supported server Windows 10 Build 20348
Target Platform Windows
Header windows.devices.display.core.interop.h
Library d3d12.lib
DLL d3d12.dll