DCompositionCreateDevice3 function (dcomp.h)

Creates a new DirectComposition device object, which can be used to create other DirectComposition objects.

Syntax

HRESULT DCompositionCreateDevice3(
  IUnknown *renderingDevice,
  REFIID   iid,
  void     **dcompositionDevice
);

Parameters

renderingDevice

Type: IUnknown*

An optional pointer to a DirectX device to be used to create DirectComposition surface objects. Must be a pointer to an object implementing the IDXGIDevice or ID2D1Device interfaces.

iid

Type: REFIID

The identifier of the interface to retrieve. This must be one of __uuidof(IDCompositionDevice) or __uuidof(IDCompositionDesktopDevice).

dcompositionDevice

Type: void**

Receives an interface pointer to the newly created device object. The pointer is of the type specified by the iid parameter. This parameter must not be NULL.

Return value

Type: HRESULT

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

Requirements

   
Target Platform Windows
Header dcomp.h
Library Dcomp.lib
DLL Dcomp.dll