GetLastInputInfo function (winuser.h)
Retrieves the time of the last input event.
BOOL GetLastInputInfo( [out] PLASTINPUTINFO plii );
A pointer to a LASTINPUTINFO structure that receives the time of the last input event.
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
This function is useful for input idle detection. However, GetLastInputInfo does not provide system-wide user input information across all running sessions. Rather, GetLastInputInfo provides session-specific user input information for only the session that invoked the function.
The tick count when the last input event was received (see LASTINPUTINFO) is not guaranteed to be incremental. In some cases, the value might be less than the tick count of a prior event. For example, this can be caused by a timing gap between the raw input thread and the desktop thread or an event raised by SendInput, which supplies its own tick count.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Header||winuser.h (include Windows.h)|