DCompositionCreateSurfaceHandle function

Creates a new composition surface object that can be bound to a Microsoft DirectX swap chain or swap buffer and associated with a visual.

Syntax


HRESULT WINAPI DCompositionCreateSurfaceHandle(
  _In_      DWORD desiredAccess,
  _In_opt_  SECURITY_ATTRIBUTES *securityAttributes,
  _Out_     HANDLE *surfaceHandle
);

Parameters

desiredAccess [in]

Type: DWORD

The requested access to the composition surface object. It can be one of the following values:

ValueMeaning
0x0000L

No access.

COMPOSITIONSURFACE_READ
0x0001L

Read access. For internal use only.

COMPOSITIONSURFACE_WRITE
0x0002L

Write access. For internal use only.

COMPOSITIONSURFACE_ALL_ACCESS
0x0003L

Read/write access. Always specify this flag except when duplicating a surface in another process, in which case set desiredAccess to 0.

 

securityAttributes [in, optional]

Type: SECURITY_ATTRIBUTES*

Contains the security descriptor for the composition surface object, and specifies whether the handle of the composition surface object is inheritable when a child process is created. If this parameter is NULL, the composition surface object is created with default security attributes that grant read and write access to the current process, but do not enable child processes to inherit the handle.

surfaceHandle [out]

Type: HANDLE*

The handle of the new composition surface object. This parameter must not be NULL.

Return value

Type: HRESULT

If the function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. See DirectComposition Error Codes for a list of error codes.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Dcomp.h

Library

Dcomp.lib

DLL

Dcomp.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft