How to detect System Lock-Unlock Time RRS feed

  • Question

  • Hi all

    I am able to detect system Login, logout,Idle time but how i can detect the lock-unlock time of the system in an MFC application. 

    Please help

    Regards Param

    Saturday, August 7, 2010 1:03 PM


  • Hi param,

    As far as I know, there is no API to obtain the time for lock – unlock. However we can record it by ourselves. We can handle the WM_MTSSESSION_CHANGE message in a background application or services. Therefore we can log the notifications when the system lock and unlock.

    I hope this alternate solution can solve your problem.

    Edit: Check out this one, it may help: http://technet.microsoft.com/en-us/library/cc721961(WS.10).aspx (Winlogon Notification packages and Service Control Manager Notifications)



    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Yi Feng Li Friday, August 13, 2010 2:02 AM
    Tuesday, August 10, 2010 8:58 AM