DirectComposition error codes

Header: dcomp.h

If an error occurs, Microsoft DirectComposition returns a code as an HRESULT value. This section describes the error codes that are specific to DirectComposition. For a list of general Component Object Model (COM) error codes, see COM Error Codes.

SymbolicCodeDescription
DCOMPOSITION_ERROR_SURFACE_BEING_RENDEREDBeginDraw
S_OKEndDraw
DCOMPOSITION_ERROR_ACCESS_DENIEDThe window handle that was specified in a call to the [**IDCompositionDevice::CreateTargetForHwnd**](/windows/win32/api/dcomp/nf-dcomp-idcompositiondevice-createtargetforhwnd) method belongs to a different process from the one that created the device object.
DCOMPOSITION_ERROR_SURFACE_NOT_BEING_RENDEREDThe application called the [**IDCompositionSurface::SuspendDraw**](/windows/win32/api/dcomp/nf-dcomp-idcompositionsurface-suspenddraw), [**IDCompositionSurface::ResumeDraw**](/windows/win32/api/dcomp/nf-dcomp-idcompositionsurface-resumedraw), or [**IDCompositionSurface::EndDraw**](/windows/win32/api/dcomp/nf-dcomp-idcompositionsurface-enddraw) method for a surface that is not being rendered. For more information, see Remarks.
DCOMPOSITION_ERROR_WINDOW_ALREADY_COMPOSEDThe [**IDCompositionDevice::CreateTargetForHwnd**](/windows/win32/api/dcomp/nf-dcomp-idcompositiondevice-createtargetforhwnd) method was called with *hwnd* and *topmost* parameters for which a visual tree already exists.
5 entries

Article text from the Win32 documentation (opens in a new tab), by Microsoft, under the CC BY 4.0 (opens in a new tab) licence.