User32GetLastInputInfo Method

Retrieves the time of the last input (mouse or keyboard) event.

This function is useful for input idle detection. However, GetLastInputInfo(LastInputInfo) does not provide system-wide user input information across all running sessions. Rather, GetLastInputInfo(LastInputInfo) provides session-specific user input information for only the session that invoked the function

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", SetLastError = true)]
public static bool GetLastInputInfo(
	ref LastInputInfo refInfo
)

Parameters

refInfo  LastInputInfo
A pointer to a LastInputInfo structure that receives the time of the last input event..

Return Value

Boolean
If the function succeeds, the return value is ; otherwise, .

Remarks

See Also