IDCompositionDevice::Commit method

Commits all DirectComposition commands that are pending on this device.

Syntax

HRESULT Commit(

);

Parameters

This method has no parameters.

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 IDCompositionDevice::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.

Examples

For an example, see How to Build a Simple Visual Tree.

Requirements

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

See Also

IDCompositionDevice