brucexs wrote (on 10.04.2005 19:40): >>http://www.cs.tau.ac.il/~shalitaa/lockcheck/lockcheck.cpp > This needs to be run as a service and does not appear related to a > Windows Hook.
Yes it is. The problem is currently we can determine whether the computer's been "resumed after hibernation|standby" but not whether the desktop has been unlocked. However, with some monitoring tricks, I could easily detect "unlock" and even "resumed after suspension", _if_ I had the information whether the desktop is "winlogon", "screensaver" or "default". If Windows has already such a service, much better, I'll assume there isn't. Since PP and all PP-scheduled scripts go on running in the background, even when the desktop is locked, any change from "desktop" to "winlogon" would mean "On_Desktop_Lock"; since you can already detect PPShutdown I'm sure you'd find a way to differentiate this state from "On_Logoff". Similarly, any change from "winlogon" to "default" would mean one of "post-resume" and "post-unlock". As soon as a computer resumes after suspension, PP and all scheduled scripts would start running again and the next change from "winlogon" to "default" would indicate either "post-resume" or "post-unlock". Now, PP would check the lastaccess-time of some specific file every 1 min, say powerpro.hlp. If the lastaccess time of the file is sufficienlty older than 1 min (say 2:00, reserving some buffer), then this should be the "post-wakeup" state. If the file's lastaccess isn't older than 1:00, PP would update the accesstime and next login event (i.e. desktop state's change to "desktop") would mean "post-unlock". So, to summarize, I thought you could use the GetUserObjectInformation() as in the posted .cpp code. You could either implement 2 more states on HookSystemEvents "On_Lock" & "On_Unlock". You could detect these changes within PP, or return the desktop name so that we can detect it ourselves. Honestly I'd prefer you do it. It might not work for ppl without a password but OTOH for them "On_Un/lock" becomes absurd anyway. I hope I could make it clear, and I certainly hope even more that I don't have any error in my reasoning :} peace c� -- Reclaim Your Inbox! www.mozilla.org/products/thunderbird Attention: PowerPro's Web site has moved: http://www.ppro.org Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/power-pro/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
