DwmGetCompositionTimingInfo function

Retrieves the current composition timing information for a specified window.


DWMAPI DwmGetCompositionTimingInfo(
  HWND            hwnd,
  DWM_TIMING_INFO *pTimingInfo



The handle to the window for which the composition timing information should be retrieved.

Starting with Windows 8.1, this parameter must be set to NULL. If this parameter is not set to NULL, DwmGetCompositionTimingInfo returns E_INVALIDARG.


A pointer to a DWM_TIMING_INFO structure that, when this function returns successfully, receives the current composition timing information for the window. The cbSize member of this structure must be set before this function is called.

Return Value

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.


Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header dwmapi.h
Library Dwmapi.lib
DLL Dwmapi.dll