The GetLastInputInfo function retrieves the time of the last input event.
Syntax
BOOL GetLastInputInfo(
PLASTINPUTINFO plii
);
Parameters
- plii
-
[out] Pointer to a LASTINPUTINFO structure that receives the time of the last input event.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
Remarks
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.
Function Information
| Minimum DLL Version | user32.dll |
|---|
| Header | Declared in Winuser.h, include Windows.h |
|---|
| Import library | User32.lib |
|---|
| Minimum operating systems |
Windows 2000 |
|---|
See Also
Keyboard Input, LASTINPUTINFO