I want to write a service with Delphi that processes file system events. Basically, when files and directories are created or changed, I want to push them to the cloud. I was hoping to use TSHChangeNotify (see TSHChangeNotify on StackOverflow), but it doesn't appear to work in a service; I was able to do exactly what I needed with it in a regular GUI app, but it dies in a service. I've yet to determine where it dies, but I wonder if I'm going down the best path.
So, can anyone shed light on these two (related) questions:
Can TSHChangeNotify be used in a service (FYI I am using the Aldyn SvCom framework, which is how I get the component onto a form in the first place!) and if so, what are the tricky bits?
Regardless of 1, what is the best way to write a service that gets notified of file system events?
Basically, I am trying to copy files and directories that are created or modified into the cloud, transparently to the user.
Thanks!