How to tell when user locks computer (windows)?
-
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 -
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.
-
Lukas can u provide simple example how to use it, pls ?