Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
User Input
Keyboard Input
Functions
 GetLastInputInfo Function

  Switch on low bandwidth view
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 What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Sample, and global monitoring      F. Chapleau   |   Edit   |   Show History

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 What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker