[DllImport("dwmapi")]
public static extern DWMAPI DwmGetCompositionTimingInfo(IntPtr hwnd, ref DWM_TIMING_INFO pTimingInfo);
Notes:
The return value type DWMAPI is just a uint, you can replace it with HRESULT as well.
The first parameter hwnd must be set to NULL (IntPtr.Zero) since Windows 8.1,
before Windows 8.1 it works as well so just don't bother and set it to IntPtr.Zero and call it a day.
The second parameter pTimingInfo is a DWM_TIMING_INFO , check it's page for information on how to use it.
An IntPtr is a pointer to a memory location (unmanaged) that adapts to the platform it is running on (64-bit, etc.) UNLIKE a standard int/Integer. You should always use this type for unmanaged calls that require it, even though an int will appear to work on your development machine.
1/13/2008 4:00:13 AM - Damon Carr-72.43.165.29
An IntPtr is a pointer to a memory location (unmanaged) that adapts to the platform it is running on (64-bit, etc.) UNLIKE a standard int/Integer. You should always use this type for unmanaged calls that require it, even though an int will appear to work on your development machine.
1/13/2008 4:00:13 AM - Damon Carr-72.43.165.29
Specifies Desktop Window Manager (DWM) composition timing information. Used by DwmGetCompositionTimingInfo
12/7/2019 5:35:01 AM - RadarNyan@gmail.com-139.162.76.11