How to tell when user locks computer (windows)?
General and Desktop
3
Posts
3
Posters
2.6k
Views
1
Watching
-
wrote on 23 Oct 2011, 12:30 last edited by
Hello I'm wondering how to tell when the user locks the computer (windows xp, vista & 7). My intention is to create a small app that that logs the time the computer is locked and unlocked. So I need to know how to tell when the user locks the computer so it can log the time. Thank you!
Best regards
Richard -
wrote on 24 Oct 2011, 06:01 last edited by
You will have to use platform-specific code. Take a look at "WTSRegisterSessionNotification":http://goo.gl/NyRd6 and "WM_WTSSESSION_CHANGE":http://goo.gl/TebEK.
-
wrote on 31 Oct 2011, 12:59 last edited by
Lukas can u provide simple example how to use it, pls ?