|
|
Tuesday, November 27, 2007 |
Backup and Vista
Posted: 5:41:00 PM
|
My FTP backup solution, aptly named Backup, stopped working properly when Kathy and I upgraded to Windows Vista. Unfortunately, there is no way for a Windows service to hook into mouse or keyboard messages for the desktop of the user logged in. This is a problem because now Backup can't tell how long the user has been idle, a key component in determining when to backup files. The .NET 2.0 framework did not provide a reasonable way for me to overcome this hurdle, so the project's sat in limbo for months.
Currently, Backup has 3 modules. First is the Setup module which allows the user to select which files they want to have backed up, and what server to back them up to. Easy enough. Second is the Service module that actually does the backing up. Third is the roncli Productions common module that handles things such as registration and about dialogs.
Since the Service module can no longer handle idle time detection, I have to split that piece out, yet somehow communicate back to the Service module when an application is idle. Windows Communication Foundation to the rescue.
With WCF in the .NET 3.0 (and now 3.5) framework, I am able to easily create messages to send from a client app to a server app. I simply alter the Setup piece to be always running in the background when the user logs on, and tells the Service when the user is idle. Of course, there can be multiple users, so all the users would have to be idle at once, which is no big deal to figure out.
This seems like an awful lot of work to get a service to know when its users are idle, but it'll get the job done, and Backup will finally be Vista-ready.Labels: Backup, Coding
0 Comments
|
|