I would like to implement a way for a windows application or service to lock and unlock the interactive users session based on external input.
Example: when the users phone gets out of range, their session is automatically locked. When the phone gets back in range, the session is automatically unlocked. The IPhone/Mac app "Near Lock" does this.
How can I programatically lock and unlock a user's session, either from an application running in that session or from a windows service?