I need to detect changes to (certain) files whenever they are accessed, a bit similar to what a virus scanner does with on-access scan.

Also, I need to get notified whenever a change of any kind is made in the registry.

Rather than taking snapshots of the file(s) or registry and then compare them to what I had earlier, I was hoping to be able to get some sort of event that I could subscribe to. Is that possible?