IDCompositionDevice2::Commit method (dcomp.h)

Commits all DirectComposition commands that are pending on this device.

Syntax

HRESULT Commit();

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.

Remarks

Calls to DirectComposition methods are always batched and executed atomically as a single transaction. Calls take effect only when IDCompositionDevice2::Commit is called, at which time all pending method calls for a device are executed at once.

An application that uses multiple devices must call Commit for each device separately. However, because the composition engine processes the calls individually, the batch of commands might not take effect at the same time.

Requirements

Requirement Value
Minimum supported client Windows 8.1 [desktop apps only]
Minimum supported server Windows Server 2012 R2 [desktop apps only]
Target Platform Windows
Header dcomp.h
Library Dcomp.lib
DLL Dcomp.dll

See also

IDCompositionDevice2