How do I get events about changed files, directories and media in a Windows service?
+2
A:
If your service is written in a .NET language, you can use System.IO.FileSystemWatcher to monitor file/folder changes.
Jonners
2010-02-15 15:22:00
How would this be done using native c++?
Wienczny
2010-02-15 15:29:19
I guess if MFC has no direct equivalent of FileSystemWatcher (and I'm not a C++ coder, so I'll defer that question to others) you'd need to invoke a background thread that periodically checked specific parts of the filesystem and alerted the main application if a change were observed.
Jonners
2010-02-15 16:34:29