DCompositionCreateDevice3 function (dcomp.h)

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

Syntax

HRESULT DCompositionCreateDevice3(
  [in, optional] IUnknown *renderingDevice,
  [in]           REFIID   iid,
  [out]          void     **dcompositionDevice
);

Parameters

[in, optional] 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.

[in] iid

Type: REFIID

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

[out] 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

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