DirectComposition error codes
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.
-
DCOMPOSITION_ERROR_ACCESS_DENIED
-
-
The window handle that was specified in a call to the IDCompositionDevice::CreateTargetForHwnd method belongs to a different process from the one that created the device object.
-
DCOMPOSITION_ERROR_SURFACE_BEING_RENDERED
-
-
The surface was already being rendered when the application called the IDCompositionSurface::BeginDraw, IDCompositionSurface::SuspendDraw, or IDCompositionSurface::ResumeDraw method. For more information, see Remarks.
-
DCOMPOSITION_ERROR_SURFACE_NOT_BEING_RENDERED
-
-
The application called the IDCompositionSurface::SuspendDraw, IDCompositionSurface::ResumeDraw, or IDCompositionSurface::EndDraw method for a surface that is not being rendered. For more information, see Remarks.
-
DCOMPOSITION_ERROR_WINDOW_ALREADY_COMPOSED
-
-
The IDCompositionDevice::CreateTargetForHwnd method was called with hwnd and topmost parameters for which a visual tree already exists.
Remarks
If a call to the IDCompositionSurface::BeginDraw was the most recent action:
Calling this method: | Returns this value: |
---|---|
BeginDraw | DCOMPOSITION_ERROR_SURFACE_BEING_RENDERED |
EndDraw | S_OK |
SuspendDraw | S_OK |
ResumeDraw | DCOMPOSITION_ERROR_SURFACE_BEING_RENDERED |
If a call to the IDCompositionSurface::SuspendDraw was the most recent action:
Calling this method: | Returns this value: |
---|---|
BeginDraw | DCOMPOSITION_ERROR_SURFACE_BEING_RENDERED |
EndDraw | S_OK |
SuspendDraw | DCOMPOSITION_ERROR_SURFACE_BEING_RENDERED |
ResumeDraw | S_OK |
If a call to the IDCompositionSurface::ResumeDraw was the most recent action:
Calling this method: | Returns this value: |
---|---|
BeginDraw | DCOMPOSITION_ERROR_SURFACE_BEING_RENDERED |
EndDraw | S_OK |
SuspendDraw | S_OK |
ResumeDraw | DCOMPOSITION_ERROR_SURFACE_BEING_RENDERED. |
If a call to the IDCompositionSurface::EndDraw was the most recent action:
Calling this method: | Returns this value: |
---|---|
BeginDraw | S_OK |
EndDraw | DCOMPOSITION_ERROR_SURFACE_NOT_BEING_RENDERED. |
SuspendDraw | DCOMPOSITION_ERROR_SURFACE_NOT_BEING_RENDERED. |
ResumeDraw | DCOMPOSITION_ERROR_SURFACE_NOT_BEING_RENDERED. |
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 8 [desktop apps only] |
Minimum supported server |
Windows Server 2012 [desktop apps only] |
Header |
|