GetLastInputInfo Function

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 Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systems Windows 2000

See Also

Tags :


Community Content

F. Chapleau
Sample, and global monitoring

Computer monitoring can be done using GetLastInputInfo, by creating a service that runs under the local machine account, even remote sessions (RDP) can be monitored.

http://www.chapleau.info/wiki/Project_ActivityMonitoring

Tags :

Page view tracker