IDCompositionDesktopDevice::CreateSurfaceFromHandle method

Creates a new composition surface object that wraps an existing composition surface.

Syntax

HRESULT CreateSurfaceFromHandle(
  HANDLE   handle,
  IUnknown **surface
);

Parameters

handle

The handle of an existing composition surface that was created by a call to the DCompositionCreateSurfaceHandle function.

surface

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

Return Value

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

   
Target Platform Windows
Header dcomp.h

See Also

IDCompositionDesktopDevice

IDCompositionVisual::SetContent